[25549] in Perl-Users-Digest

home help back first fref pref prev next nref lref last post

Perl-Users Digest, Issue: 7793 Volume: 10

daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Feb 17 09:05:59 2005

Date: Thu, 17 Feb 2005 06:05:35 -0800 (PST)
From: Perl-Users Digest <Perl-Users-Request@ruby.OCE.ORST.EDU>
To: Perl-Users@ruby.OCE.ORST.EDU (Perl-Users Digest)

Perl-Users Digest           Thu, 17 Feb 2005     Volume: 10 Number: 7793

Today's topics:
    Re: A wide open niche in Perl publishing... <cwilbur@mithril.chromatico.net>
        DOM sub trees whilst SAX'ing in perl? <bugbear@trim_papermule.co.uk_trim>
    Re: Don't understand this syntax - <someone@example.com>
        forking & (mysql)sockets arnevt@sloeber.office.xs4all.be
    Re: forking & (mysql)sockets <nobull@mail.com>
    Re: Hash references & parsing HTML with HTML::Parser <nobull@mail.com>
    Re: Help Programming in Perl for File Renaming babydoe@mailinator.com
    Re: Help Programming in Perl for File Renaming <nobull@mail.com>
        justify text and PDF::API2 module (mike)
    Re: perl script to write to a text file <mounilkadakia@hotmail.com>
    Re: perl script to write to a text file <spamtrap@dot-app.org>
    Re: perl script to write to a text file <mounilkadakia@hotmail.com>
    Re: perl script to write to a text file <postmaster@castleamber.com>
    Re: Problem with IO::Socket [... on Mac OS X] <news@chaos-net.de>
    Re: Problem with IO::Socket [... on Mac OS X] (Anno Siegel)
    Re: Problem with IO::Socket [... on Mac OS X] <news@chaos-net.de>
        regexp: read ip address <ax178@wp.pl>
    Re: SET Operations in Perl <tintin@invalid.invalid>
    Re: SET Operations in Perl <georgekinley@hotmail.com>
    Re: SET Operations in Perl <abigail@abigail.nl>
    Re: SET Operations in Perl <tintin@invalid.invalid>
    Re: SET Operations in Perl <georgekinley@hotmail.com>
    Re: SET Operations in Perl <georgekinley@hotmail.com>
    Re: SET Operations in Perl <bernard.el-haginDODGE_THIS@lido-tech.net>
    Re: SET Operations in Perl <jns@gellyfish.com>
    Re: SET Operations in Perl <phaylon@dunkelheit.at>
    Re: SET Operations in Perl <phaylon@dunkelheit.at>
    Re: The Problem with Perl <cwilbur@mithril.chromatico.net>
    Re: Using Perl to Parse Excel File <me@somewhere.com>
        what is Perl state of the art? warble606@yahoo.com
        Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)

----------------------------------------------------------------------

Date: Thu, 17 Feb 2005 11:49:20 GMT
From: Charlton Wilbur <cwilbur@mithril.chromatico.net>
Subject: Re: A wide open niche in Perl publishing...
Message-Id: <87650rpfwi.fsf@mithril.chromatico.net>

>>>>> "b" == bill  <please_post@nomail.edu> writes:

    b> Maybe Joel Spolsky (who coined the term "architecture
    b> astronautics") is right in his claim that programming is
    b> something that most people can only learn through
    b> apprenticeship, not in school (and even less from books).  The
    b> implication from this is that real-world programming is an
    b> activity dominated by issues that are too varied, too
    b> contingent, and too specific to be suitable for teaching grand
    b> theories in a university class (or for writing best-selling
    b> books about).

I don't really think that's the case.  I think it's much more the case
that *good* books about stuff at the brass-tacks level are extremely
difficult to write well and extremely subject-specific.  In
particular, they don't appeal to managers who aren't up to their
elbows in the material, and they don't appeal to novice programmers.
There is no "Teach Yourself How To Write A Database In 24 Hours," and
probably no market for it.  

(The only books I can think of that come close to being what you're
talking about are _Advanced Programming in the Unix Environment_ and
_Unix Network Programming_.  Both contain a lot of information, from
the theoretical to the gritty and practical.)

I think Joel's idea is superfically attractive (like so many of his
ideas are) because what is taught in university courses is computer
science, where grand unified theories of everything are attractive and
part of the discipline, and what is taught in the vast majority of
books on bookstore shelves in the "computer" section is the rudiments
of programming, which is far too basic for anyone who's actually
working in the profession already.  There's a giant
software-engineering shaped hole there, and a real dearth of material
aimed at people who already know how to program (and thus don't need
to have the concepts of variables, objects, scoping, or loops
explained to them for the fifteenth time) but who are looking for
information on higher (or deeper) topics.

When people eliminate the mystic folderol that claims that software
engineering is essentially different from mechanical engineering or
chemical engineering, and when software engineers are board-certified
and are legally liable for their work just as professional engineers
are, then this nonsense about how special writing software is will
disappear.

Charlton





-- 
cwilbur at chromatico dot net
cwilbur at mac dot com


------------------------------

Date: Thu, 17 Feb 2005 13:23:40 +0000
From: bugbear <bugbear@trim_papermule.co.uk_trim>
Subject: DOM sub trees whilst SAX'ing in perl?
Message-Id: <42149aea$0$30551$ed2e19e4@ptn-nntp-reader04.plus.net>

I need to process some XML files that are rather large.
However their structure may usefully be expressed
as
<ELEMENT FILE (RECORD)+>
 .
 .
 .

Each record is a few Kb. The files are many 10's of Megabytes.

I would (dearly) like to use DOM to process each record,
since it's easier to get my head round than SAX events.

But I don't want to pull the whole file into
a DOM tree; it's too big.

These people have come up with a perfect (and obvious?)
solution:
http://www.devsphere.com/xml/saxdomix/

But I'm coding in a Perl environment.

Is there a similar Module, generating separate
DOM sub trees for Perl?

      BugBear


------------------------------

Date: Thu, 17 Feb 2005 09:10:26 GMT
From: "John W. Krahn" <someone@example.com>
Subject: Re: Don't understand this syntax -
Message-Id: <6cZQd.49495$K54.41502@edtnps84>

Sherm Pendley wrote:
> Larry wrote:
> 
>>had actually looked at numerous lists of the common escape characters, but
>>none had the \s on them. I've used lots of others, but apparantly just
>>never needed a space before, so didn't know that one.
> 
> A bit of a nit-pick: "\s" doesn't just match "a space", it matches *any*
> whitespace character. That includes spaces, tabs, carriage returns,
> newlines, and possibly other whitespace characters I'm forgetting at the
> moment.

\s covers those four and the formfeed character.  If you want the vertical tab
as well, you have to use the POSIX character class [:space:].


John
-- 
use Perl;
program
fulfillment


------------------------------

Date: Thu, 17 Feb 2005 11:21:33 +0100
From: arnevt@sloeber.office.xs4all.be
Subject: forking & (mysql)sockets
Message-Id: <pan.2005.02.17.10.21.32.923011@sloeber.office.xs4all.be>

Hi

I'm writing a small getcounter script, and due to growing pains, I want it
to fork all it's queries (to a max of 5 forks, and then waiting to start a
new one until someone get's free).
I had a small issue with Net::SNMP being defined before it was forked, and
all sessions were using the same src-port (with the well known
consequenses). Now there is 1 socket opened to a mysql-server. I was
wondering: all forks have to update the database with their
particular result. Would it cause problems  if 2 or more forks were doing
an update through the same $socket (at the same time)?

thx
Arne



------------------------------

Date: Thu, 17 Feb 2005 13:18:21 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: forking & (mysql)sockets
Message-Id: <cv258c$a8i$1@sun3.bham.ac.uk>



arnevt@sloeber.office.xs4all.be wrote:

> Now there is 1 socket opened to a mysql-server. I was
> wondering: all forks have to update the database with their
> particular result. Would it cause problems  if 2 or more forks were doing
> an update through the same $socket (at the same time)?

Yes.

And potentially, depending on the statefullness of the mysql protocol, 
it would also cause problems even if they took it in turns.

In general[1], unless the protocol makes special provisions, a client 
can't fork and share a single connection to a server.

[1] General meaning this is not specific to Perl or mysql.



------------------------------

Date: Thu, 17 Feb 2005 08:27:44 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: Hash references & parsing HTML with HTML::Parser
Message-Id: <cv1k85$29i$2@sun3.bham.ac.uk>

Gary E. Ansok wrote:

> In article <cv07g6$dn1$1@sun3.bham.ac.uk>,
> Brian McCauley  <nobull@mail.com> wrote:
>>
>>  push @$attrseq => "pref-$number";
> 
> 
> Shouldn't that be
> 
>    push @$attrseq => "id";

Yes, of course, thanks.



------------------------------

Date: 16 Feb 2005 22:14:54 -0800
From: babydoe@mailinator.com
Subject: Re: Help Programming in Perl for File Renaming
Message-Id: <1108620893.972243.123910@c13g2000cwb.googlegroups.com>

TMTOWTDI : means it's Larry's way or the hiway.

Indicates the exit sign with a gesture, "Lynn there's the
hiway."  It's not so much the turgid examples written in
archaic Perl that you've dredged up, but rather that your
algorithm is needlessly wasteful. It is wasteful because it
slurps the whole file when it only needs to read a part of
the file (and probably only the head.)  Your algorithm
should exit a file on the first match.

Don't fret; there's no need to finger point at me : your
gentle narrator is also hitting the hiway, after failing to
provide a good solution.  And I do realize I write Perl like
a clown, but from what I've read on this newsgroup I won't
get a good solution unless I put up a bad solution.  (Is
that a usenet law?). So here is my attempt :

#!perl
use strict ;
use warnings ;
@ARGV = <*.txt> ;
my %name ;
while (<>) {
  # finds last match want an early exit on first match.
  $name{$ARGV} = $1 if ( /File name:\s+(\w+)/ ) ;
}
rename $_, $name{$_} for (keys %name) ;
__END__

and a sample file called a.txt :

----%<-----------start of a.txt----------------------


File name: testA


----%<-----------end of a.txt------------------------



------------------------------

Date: Thu, 17 Feb 2005 08:25:52 +0000
From: Brian McCauley <nobull@mail.com>
Subject: Re: Help Programming in Perl for File Renaming
Message-Id: <cv1k4m$29i$1@sun3.bham.ac.uk>



babydoe@mailinator.com wrote:
> And I do realize I write Perl like
> a clown, but from what I've read on this newsgroup I won't
> get a good solution unless I put up a bad solution.  (Is
> that a usenet law?). So here is my attempt :

[ snip perfectly good solution ]

I can't fault your solution.

Well, if you really insist we find fault

> rename $_, $name{$_} for (keys %name) ;

Could perhaps...

   rename $_, $name{$_} or die "rename $_: $!" for (keys %name);

But I'd only bother to do that if this script were to be kept and 
reused.  If it were a disposable single use script I might not bother.



------------------------------

Date: 17 Feb 2005 01:26:04 -0800
From: s99999999s2003@yahoo.com (mike)
Subject: justify text and PDF::API2 module
Message-Id: <dfd17ef4.0502170126.50b700f4@posting.google.com>

hi

i am using PDF::API2 module to create pdf
how can i align or justify the text that is being created , much like
what Microsoft word can do..under
Format->paragraph->alignment->Justify

thanks


------------------------------

Date: 16 Feb 2005 21:07:17 -0800
From: "Mounilk" <mounilkadakia@hotmail.com>
Subject: Re: perl script to write to a text file
Message-Id: <1108616837.522985.306560@g14g2000cwa.googlegroups.com>

thanks Sherm.John, i really appreciate you helping me out. i couldn't
really follow your suggestion. i am sorry if i sound naive,but i've
just started using perl a couple of days. could you please elaborate on
your suggestion.

Thanks,
Mounil.



------------------------------

Date: Thu, 17 Feb 2005 01:45:42 -0500
From: Sherm Pendley <spamtrap@dot-app.org>
Subject: Re: perl script to write to a text file
Message-Id: <WZ6dnVivIpwLoInfRVn-1A@adelphia.com>

Mounilk wrote:

> thanks Sherm.John, i really appreciate you helping me out. i couldn't
> really follow your suggestion. i am sorry if i sound naive,but i've
> just started using perl a couple of days. could you please elaborate on
> your suggestion.

"perldoc" is a utility commonly used to read the documentation that comes
with Perl. Other methods can be used too; for example ActiveState's Perl
for Windows comes with documentation in HTML format as well.

Regardless of whether you're actually using the "perldoc" tool or not, when
you see the term "perldoc Foo" used here in this group, it's a pointer to
the documentation that comes with Perl.

When you're using the "perldoc" tool, "perldoc -q Foo" searches the FAQ
questions for the word "Foo". "perldoc -f foo" will display the docs for
the function foo(). And "perldoc Foo::Bar" will display docs for the module
Foo::Bar.

So, my suggestion to you was to read the documentation for the open() and
print() functions. John's suggestion is good too - go to <http:/
search.cpan.org>, find the File::Slurp module, and have a look at its
documentation.

And like I said before - please read (and follow) the posting guidelines
that appear here twice a week.

sherm--

-- 
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org


------------------------------

Date: 16 Feb 2005 22:54:31 -0800
From: "Mounilk" <mounilkadakia@hotmail.com>
Subject: Re: perl script to write to a text file
Message-Id: <1108623271.348114.237090@o13g2000cwo.googlegroups.com>

thanks a lot for that Sherm. You and John have been very helpfull. I
will most certainly have a look at the posting guidelines tonight
because i'll be using this group often and hopefully contributing to
the group as well in the future. Once again, thank you.
-Mounil.



------------------------------

Date: 17 Feb 2005 07:13:38 GMT
From: John Bokma <postmaster@castleamber.com>
Subject: Re: perl script to write to a text file
Message-Id: <Xns9600C7C2FDC2castleamber@130.133.1.4>

Mounilk wrote:

> thanks a lot for that Sherm. You and John have been very helpfull. I
> will most certainly have a look at the posting guidelines tonight
> because i'll be using this group often and hopefully contributing to
> the group as well in the future. Once again, thank you.
> -Mounil.

What works for me: read a book front to back. Skip everything you don't 
understand. Just keep reading.

Read it a second time, and mark the important parts. Also, try out the 
examples.

I am doing this with "Dive into Python" and for me this works. There is no 
Dive into Perl afaik, but Learning Perl is probably a very good start too, 
and maybe better if you are new at programming Perl.

If you are serious at Perl programming, buy the Cookbook too :-D.

-- 
John                   Small Perl scripts: http://johnbokma.com/perl/
               Perl programmer available:     http://castleamber.com/
            Happy Customers: http://castleamber.com/testimonials.html
                        


------------------------------

Date: Thu, 17 Feb 2005 07:37:37 +0100
From: Martin Kissner <news@chaos-net.de>
Subject: Re: Problem with IO::Socket [... on Mac OS X]
Message-Id: <slrnd18eth.1rr.news@maki.homeunix.net>

xhoster@gmail.com wrote :
> Martin Kissner <news@chaos-net.de> wrote:
>
>> I do still not know how to find out why it doesn't work on my system.
>> Any suggestions are welcome.
>
> After you added error checking, did it still hang with the first one, or
> did you get a connection refused?

This morning I tried to connect to a ftp-server in my LAN and watched the
network with tcpdump.
There was no attempt to connect and the script hanged as it did without 
error checking.
With a port number the script connected at once.
With an invalid port number I got the error message as expected
(Connection refused ... ).

What else could I do to find the reason for this behaviour?

Regards
Martin

-- 
perl -e 'print 7.74.117.115.116.11.32.13.97.110.111.116.104.101.114.11
 .32.13.112.101.114.108.11.32.13.104.97.99.107.101.114.10.7'


------------------------------

Date: 17 Feb 2005 12:18:40 GMT
From: anno4000@lublin.zrz.tu-berlin.de (Anno Siegel)
Subject: Re: Problem with IO::Socket [... on Mac OS X]
Message-Id: <cv2230$jeg$1@mamenchi.zrz.TU-Berlin.DE>

Martin Kissner  <news@chaos-net.de> wrote in comp.lang.perl.misc:
> A. Sinan Unur wrote :

> > You will need to give some more information regarding the system on which 
> > you are testing this in a clear and concise way. 
> 
> Of course.
> I should have done in the first place.
> 
> % uname -msr 
> Darwin 7.8.0 Power Macintosh 
> # which is Mac OS X

Something is fishy on Darwin.  I also see it hang when the service is
given by name and reply as expected when given by port number.  However,
just *calling* getservbyname() before opening the socket makes it work
with a name too.

    use IO::Socket;

    my $server = shift;

    if ( my ( $port) = $server =~ /:(.*)/ ) {
        # just call it
        getservbyname( $port, 'tcp') or die "getservbyname( $port)";
    }

    print "Trying $server\n";
    my $fh      = IO::Socket::INET->new( $server) or die $!;
    my $line    = <$fh>;
    print $line;

    __END__

This gives the expected reply from "mail.hotmail.com:smtp".  Comment out
the call to getservbyname() and it doesn't.

I'm not sure how Darwin deals with getservbyname().  It may use some
netinfo devilry instead of /etc/services.  The man page is ominously
missing.

Anno


------------------------------

Date: Thu, 17 Feb 2005 14:33:59 +0100
From: Martin Kissner <news@chaos-net.de>
Subject: Re: Problem with IO::Socket [... on Mac OS X]
Message-Id: <slrnd197a7.jt.news@maki.homeunix.net>

Anno Siegel wrote :

> Something is fishy on Darwin.

I guess it is.
I will try this on FreeBSD as soon as possible.

> I also see it hang when the service is
> given by name and reply as expected when given by port number.  However,
> just *calling* getservbyname() before opening the socket makes it work
> with a name too.
>
>     use IO::Socket;
>
>     my $server = shift;
>
>     if ( my ( $port) = $server =~ /:(.*)/ ) {
>         # just call it
>         getservbyname( $port, 'tcp') or die "getservbyname( $port)";
>     }
>
>     print "Trying $server\n";
>     my $fh      = IO::Socket::INET->new( $server) or die $!;
>     my $line    = <$fh>;
>     print $line;
>

Thank you for this code example. It works for me, too and examples like
this one expand my view since I am not so experienced in Perl
programming.

> This gives the expected reply from "mail.hotmail.com:smtp".  Comment out
> the call to getservbyname() and it doesn't.
>
> I'm not sure how Darwin deals with getservbyname().  It may use some
> netinfo devilry instead of /etc/services.  The man page is ominously
> missing.

Te documentation to Darwin sometimes is a drag. It has become better
with Panther, but it's still not goos enough.
However, Darwin does use /etc/services.
I tried by simply changing the name of a service in /etc/services.



-- 
perl -e 'print 7.74.117.115.116.11.32.13.97.110.111.116.104.101.114.11
 .32.13.112.101.114.108.11.32.13.104.97.99.107.101.114.10.7'


------------------------------

Date: Thu, 17 Feb 2005 14:34:10 +0100
From: vertigo <ax178@wp.pl>
Subject: regexp: read ip address
Message-Id: <cv26h0$7tq$1@atlantis.news.tpi.pl>

Hello
I have line with several words, and on ip address in it. How can i read 
it ? Could anybody help ?

Thanx
Michal



------------------------------

Date: Thu, 17 Feb 2005 20:19:39 +1300
From: "Tintin" <tintin@invalid.invalid>
Subject: Re: SET Operations in Perl
Message-Id: <37iuotF5c9p7kU1@individual.net>


"George" <georgekinley@hotmail.com> wrote in message 
news:xn0dykqms1gtmua000@news.europe.nokia.com...
> Hi,
> how can we do SET Operations in perl using two hashes or arrays
> in case it is too easy , please redirect me to some link

http://www.set.or.th/th/index.html

Can't see the relevance of the Stock Exchange of Thailand (SET) to hashes 
though. 




------------------------------

Date: Thu, 17 Feb 2005 07:36:40 GMT
From: "George" <georgekinley@hotmail.com>
Subject: Re: SET Operations in Perl
Message-Id: <xn0dylw6x2k3aff003@news.europe.nokia.com>

Tintin wrote:

> 
> "George" <georgekinley@hotmail.com> wrote in message 
> news:xn0dykqms1gtmua000@news.europe.nokia.com...
> > Hi,
> > how can we do SET Operations in perl using two hashes or arrays
> > in case it is too easy , please redirect me to some link
> 
> http://www.set.or.th/th/index.html
> 
> Can't see the relevance of the Stock Exchange of Thailand (SET) to
> hashes though. 

If you don't understand ask, 
why would anybody post for stock exchange in perl newsgroup 
only stupid imbecile spam head like could relate to that,


------------------------------

Date: 17 Feb 2005 08:03:52 GMT
From: Abigail <abigail@abigail.nl>
Subject: Re: SET Operations in Perl
Message-Id: <slrnd18jv8.2e8.abigail@alexandra.abigail.nl>

Tintin (tintin@invalid.invalid) wrote on MMMMCLXXXVIII September MCMXCIII
in <URL:news:37iuotF5c9p7kU1@individual.net>:
}}  
}}  "George" <georgekinley@hotmail.com> wrote in message 
}}  news:xn0dykqms1gtmua000@news.europe.nokia.com...
}} > Hi,
}} > how can we do SET Operations in perl using two hashes or arrays
}} > in case it is too easy , please redirect me to some link
}}  
}}  http://www.set.or.th/th/index.html
}}  
}}  Can't see the relevance of the Stock Exchange of Thailand (SET) to hashes 
}}  though. 


I think it was a typo. George probably mean SETI Operations.

I know all about them, but I'm not allowed to talk about them.


Abigail
-- 
srand 123456;$-=rand$_--=>@[[$-,$_]=@[[$_,$-]for(reverse+1..(@[=split
//=>"IGrACVGQ\x02GJCWVhP\x02PL\x02jNMP"));print+(map{$_^q^"^}@[),"\n"


------------------------------

Date: Thu, 17 Feb 2005 21:46:39 +1300
From: "Tintin" <tintin@invalid.invalid>
Subject: Re: SET Operations in Perl
Message-Id: <37j3s1F5ejfl7U1@individual.net>


"George" <georgekinley@hotmail.com> wrote in message 
news:xn0dylw6x2k3aff003@news.europe.nokia.com...
> Tintin wrote:
>
>>
>> "George" <georgekinley@hotmail.com> wrote in message
>> news:xn0dykqms1gtmua000@news.europe.nokia.com...
>> > Hi,
>> > how can we do SET Operations in perl using two hashes or arrays
>> > in case it is too easy , please redirect me to some link
>>
>> http://www.set.or.th/th/index.html
>>
>> Can't see the relevance of the Stock Exchange of Thailand (SET) to
>> hashes though.
>
> If you don't understand ask,
> why would anybody post for stock exchange in perl newsgroup
> only stupid imbecile spam head like could relate to that,

The point was (as you will no doubt be aware now from other replies), is 
that if you are going to ask such a vague open ended question, you aren't 
going to get very helpful answers.

The quality of the answers is generally in direct proportion to the quality 
of the question. 




------------------------------

Date: Thu, 17 Feb 2005 08:40:23 GMT
From: "George" <georgekinley@hotmail.com>
Subject: Re: SET Operations in Perl
Message-Id: <xn0dyly3a2mp0rd004@news.europe.nokia.com>

Abigail wrote:

> Tintin (tintin@invalid.invalid) wrote on MMMMCLXXXVIII September
> MCMXCIII in <url: news:37iuotF5c9p7kU1@individual.net>:
> }}  
> }}  "George" <georgekinley@hotmail.com> wrote in message 
> }}  news:xn0dykqms1gtmua000@news.europe.nokia.com...
> }} > Hi,
> }} > how can we do SET Operations in perl using two hashes or arrays
> }} > in case it is too easy , please redirect me to some link
> }}  
> }}  http://www.set.or.th/th/index.html
> }}  
> }}  Can't see the relevance of the Stock Exchange of Thailand (SET)
> to hashes }}  though. 
> 
> 
> I think it was a typo. George probably mean SETI Operations.
> 
> I know all about them, but I'm not allowed to talk about them.
> 
> 
> Abigail

If you  don't understand difference between SET Operations and SETI's
Operation , you are sure dumb head, and if someone asks for SETI in
Science group dick head like you will again complain about typo "he
mean SET"


------------------------------

Date: Thu, 17 Feb 2005 08:45:32 GMT
From: "George" <georgekinley@hotmail.com>
Subject: Re: SET Operations in Perl
Message-Id: <xn0dyly7u2mvnba005@news.europe.nokia.com>

Tintin wrote:

> 
> "George" <georgekinley@hotmail.com> wrote in message 
> news:xn0dylw6x2k3aff003@news.europe.nokia.com...
> > Tintin wrote:
> > 
> > > 
> >> "George" <georgekinley@hotmail.com> wrote in message
> >> news:xn0dykqms1gtmua000@news.europe.nokia.com...
> >> > Hi,
> >> > how can we do SET Operations in perl using two hashes or arrays
> >> > in case it is too easy , please redirect me to some link
> > > 
> >> http://www.set.or.th/th/index.html
> > > 
> >> Can't see the relevance of the Stock Exchange of Thailand (SET) to
> >> hashes though.
> > 
> > If you don't understand ask,
> > why would anybody post for stock exchange in perl newsgroup
> > only stupid imbecile spam head like could relate to that,
> 
> The point was (as you will no doubt be aware now from other replies),
> is that if you are going to ask such a vague open ended question, you
> aren't going to get very helpful answers.
> 
> The quality of the answers is generally in direct proportion to the
> quality of the question. 

then how come tore ,gtoomey,sinen understood,
correction to  your quote

"The quality of the answers is generally in direct proportion to the
 intelligence in person reading question"



------------------------------

Date: Thu, 17 Feb 2005 10:37:22 +0100
From: "Bernard El-Hagin" <bernard.el-haginDODGE_THIS@lido-tech.net>
Subject: Re: SET Operations in Perl
Message-Id: <Xns96006C0FF4054elhber1lidotechnet@62.89.127.66>

"George" <georgekinley@hotmail.com> wrote:

[...]

>> I think it was a typo. George probably mean SETI Operations.
>> 
>> I know all about them, but I'm not allowed to talk about them.
>> 
>> 
>> Abigail
> 
> If you  don't understand difference between SET Operations and SETI's
> Operation , you are sure dumb head, and if someone asks for SETI in
> Science group dick head like you will again complain about typo "he
> mean SET"


Is he a "dumb head" or a "dick head"? You seem to be torn.

Oh well, it doesn't matter anyway.


*plonk*


-- 
Cheers,
Bernard (poo-poo head)


------------------------------

Date: Thu, 17 Feb 2005 10:58:00 +0000
From: Jonathan Stowe <jns@gellyfish.com>
Subject: Re: SET Operations in Perl
Message-Id: <1108637880.67594.0@nnrp-t71-01.news.uk.clara.net>

George <georgekinley@hotmail.com> wrote:
> 
> If you  don't understand difference between SET Operations and SETI's
> Operation , you are sure dumb head, and if someone asks for SETI in
> Science group dick head like you will again complain about typo "he
> mean SET"

I'm so glad to see the quality of new contributors to this newsgroup
hasn't changed over the years.

/J\


------------------------------

Date: Thu, 17 Feb 2005 13:24:49 +0100
From: phaylon <phaylon@dunkelheit.at>
Subject: Re: SET Operations in Perl
Message-Id: <pan.2005.02.17.12.24.48.865038@dunkelheit.at>

George wrote:

> If you  don't understand difference between SET Operations and SETI's
> Operation , you are sure dumb head, and if someone asks for SETI in
> Science group dick head like you will again complain about typo "he mean
> SET"

I need a newsreader with Scores lower than -9999 for this kind of posts..

-- 
http://www.dunkelheit.at/
   -<[::..::::..::::..]>-



------------------------------

Date: Thu, 17 Feb 2005 13:26:04 +0100
From: phaylon <phaylon@dunkelheit.at>
Subject: Re: SET Operations in Perl
Message-Id: <pan.2005.02.17.12.26.04.817699@dunkelheit.at>

George wrote:

> "The quality of the answers is generally in direct proportion to the
>  intelligence in person reading question"

Yep. If you don't read, it's at zero. Did you read and think about your
question again after you typed it?

-- 
http://www.dunkelheit.at/
Thru the darkness of futures past, the magician longs to see.
One chants out between two worlds: Fire, walk with me.
                                     -- Twin Peaks, »Bob«



------------------------------

Date: Thu, 17 Feb 2005 12:49:19 GMT
From: Charlton Wilbur <cwilbur@mithril.chromatico.net>
Subject: Re: The Problem with Perl
Message-Id: <871xbfpd4b.fsf@mithril.chromatico.net>

>>>>> "JJ" == Jussi Jumppanen <jussij@zeusedit.com> writes:

    JJ> Arndt Jonasson wrote:

    >> It may be C++, but it's not C.

    JJ> This is a bit harsh.

    JJ> It is true that the C compiler might not produce any errors
    JJ> for the code but it only compilers the code under duress.

    JJ> As any good C programmer will tell you it is very dangerous to
    JJ> ignore or cast away warnings, as they are a good indication
    JJ> that something is very wrong with the code.

    JJ> IMHO the original poster is correct.

No, the original poster is *wrong*.  The code he offers as an example
is not valid C.  Valid C is defined not by "what a compiler will
accept without complaining" but by a fairly detailed specification.

    JJ> The C++ compiler gets it right and refuses to compile the code
    JJ> because they are different, while the C compiler the compiles
    JJ> the code "saying I hope you know what you are doing, because I
    JJ> certainly don't, but here it is compile code anyway".

In C++, functions with the same name but with different argument lists
are different functions.  foo (int, float) and foo (int) are different
functions in C++.  I don't recall whether having a different return
type is sufficient to differentiate two otherwise identical functions,
and I can see reasonable arguments either way.  If it is sufficient,
then the code the OP posted was valid C++ and not valid C, which is
exactly what Mr Jonasson claimed.  The original poster does not seem
to distinguish between C and C++, which is a warning sign in itself,
and offers as an example of valid C something that is in fact *not*
valid C.  I don't think the word "correct" can be successfully
redefined to apply to that.

There *are* clear specifications for what is valid C and valid C++,
after all, and they're different.

Charlton




-- 
cwilbur at chromatico dot net
cwilbur at mac dot com


------------------------------

Date: Thu, 17 Feb 2005 11:25:07 -0000
From: "Kiloran" <me@somewhere.com>
Subject: Re: Using Perl to Parse Excel File
Message-Id: <cv1utv$kqd$1@az33news01.freescale.net>


<mull0024@juno.com> wrote in message
news:1108582410.892014.226930@c13g2000cwb.googlegroups.com...
> I'm using Perl to parse through an Excel file and I'm having trouble
> with a date field.  The date displays as 1-Jan-63 (for example) but
> when the script runs it is printing as
> "Win32::OLE::Variant=SCALAR(0x2626704)"  If I print it using two $
> signs then Perl prints it as "39047808"
>
> So I guess I have two questions:
>
> 1) How does the extra $ sign change anything?
>
> 2) How do I get the data from Excel to print in Perl as dd/mm/yy ?
>
> Thanks in advance for your thelp,
> Chris
>

Be aware that Excel's display format for dates is different to the
internally stored format. Dates are based on 01Jan1900 = 1, 02Jan1900 = 2,
17Feb2005 = 38400. I am sure Perl is reading the internal numeric, not the
displayed date format.

--Kiloran




------------------------------

Date: 17 Feb 2005 05:35:34 -0800
From: warble606@yahoo.com
Subject: what is Perl state of the art?
Message-Id: <1108647334.484350.272400@c13g2000cwb.googlegroups.com>

I encountered Perl several years ago and learned
the basics in about one day. However I didn't use it
much since and I was curious what the state of the art is.
I know that modules were introduced, some of them fairly
convenient. Can Perl hook in with GUIs and such now?
Is there object-oriented Perl yet?

Incidentally I wanted to answer my own question with
a trip to the bookstore but I found that technical book
writers either have an inability to be concise, or have
perhaps some financial interest in not being concise.
:(

Thanks.



------------------------------

Date: 6 Apr 2001 21:33:47 GMT (Last modified)
From: Perl-Users-Request@ruby.oce.orst.edu (Perl-Users-Digest Admin) 
Subject: Digest Administrivia (Last modified: 6 Apr 01)
Message-Id: <null>


Administrivia:

#The Perl-Users Digest is a retransmission of the USENET newsgroup
#comp.lang.perl.misc.  For subscription or unsubscription requests, send
#the single line:
#
#	subscribe perl-users
#or:
#	unsubscribe perl-users
#
#to almanac@ruby.oce.orst.edu.  

NOTE: due to the current flood of worm email banging on ruby, the smtp
server on ruby has been shut off until further notice. 

To submit articles to comp.lang.perl.announce, send your article to
clpa@perl.com.

#To request back copies (available for a week or so), send your request
#to almanac@ruby.oce.orst.edu with the command "send perl-users x.y",
#where x is the volume number and y is the issue number.

#For other requests pertaining to the digest, send mail to
#perl-users-request@ruby.oce.orst.edu. Do not waste your time or mine
#sending perl questions to the -request address, I don't have time to
#answer them even if I did know the answer.


------------------------------
End of Perl-Users Digest V10 Issue 7793
***************************************


home help back first fref pref prev next nref lref last post