[28334] in Perl-Users-Digest
Perl-Users Digest, Issue: 9698 Volume: 10
daemon@ATHENA.MIT.EDU (Perl-Users Digest)
Thu Sep 7 14:05:52 2006
Date: Thu, 7 Sep 2006 11:05:07 -0700 (PDT)
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, 7 Sep 2006 Volume: 10 Number: 9698
Today's topics:
Re: A Perl web server: reading a client's request <glex_no-spam@qwest-spam-no.invalid>
Re: Best way to remove body/html tag from HTML::Element <afrinspray@gmail.com>
Re: CPAN 'shell' interface stopped working? <dh1760@gmail.com>
Re: CPAN 'shell' interface stopped working? <David.Squire@no.spam.from.here.au>
Re: if exsist hash key.. why not finding it??? (Gary E. Ansok)
Re: IO::Socket server <deadpickle@gmail.com>
Re: IO::Socket server <jgibson@mail.arc.nasa.gov>
Re: Numerical sort (Schwartzian xform) <awkster@yahoo.com>
Re: Pattern Matching and skipping <mattjones@hotmail.co.uk>
Re: Pattern Matching and skipping <mattjones@hotmail.co.uk>
Re: Pattern Matching and skipping <David.Squire@no.spam.from.here.au>
Re: Pattern Matching and skipping <mattjones@hotmail.co.uk>
Re: Pattern Matching and skipping <David.Squire@no.spam.from.here.au>
Re: Pattern Matching and skipping <mattjones@hotmail.co.uk>
Re: Pattern Matching and skipping <David.Squire@no.spam.from.here.au>
Re: Pattern Matching and skipping anno4000@radom.zrz.tu-berlin.de
Re: Pattern Matching and skipping <David.Squire@no.spam.from.here.au>
Digest Administrivia (Last modified: 6 Apr 01) (Perl-Users-Digest Admin)
----------------------------------------------------------------------
Date: Thu, 07 Sep 2006 12:55:10 -0500
From: "J. Gleixner" <glex_no-spam@qwest-spam-no.invalid>
Subject: Re: A Perl web server: reading a client's request
Message-Id: <45005c08$0$3566$815e3792@news.qwest.net>
saridski@gmail.com wrote:
> Hi there,
>
> I have been traversing the groups looking for an answer to a problem
> that i am having. I have written a web server in Perl. [...]
ahhh.. Possibly a dumb question, however.. why waste time doing that
when it's already been done and well tested?
http://search.cpan.org/~gaas/libwww-perl-5.805/lib/HTTP/Daemon.pm
------------------------------
Date: 7 Sep 2006 09:55:57 -0700
From: "afrinspray" <afrinspray@gmail.com>
Subject: Re: Best way to remove body/html tag from HTML::Element tree
Message-Id: <1157648157.833689.225980@i42g2000cwa.googlegroups.com>
Todd W wrote:
> http://perlmonks.org/?node_id=554219
Todd you rock. Thanks for the advice; this is exactly what I was
looking for.
Mike
------------------------------
Date: 7 Sep 2006 06:39:41 -0700
From: "Dave Hammond" <dh1760@gmail.com>
Subject: Re: CPAN 'shell' interface stopped working?
Message-Id: <1157636381.221528.177080@d34g2000cwd.googlegroups.com>
Christian Winter wrote:
> Dave Hammond wrote:
> >
> > lxrnd1:~/.cpan # perl -mCPAN -eshell
> > lxrnd1:~/.cpan #
>
> That would be expected behaviour. As "perldoc perlrun"
> explains, there's a difference between -mMODULE and -MMODULE,
> the first one use()ing the module with an empty export
> list (thus shell() doesn't get importet as a sub and Perl
> treats it as a string in your case).
>
> perl -MCPAN -e "shell"
> should still work fine.
Oops! Thanks, guys!! Funny, I must have typed that line a thousand
times in the past 10 years, and I can't recall ever typing "-m" instead
of "-M". Maybe I should just
alias cpan='perl -MCPAN -e "shell"'
:)
Thanks again,
-Dave H.
------------------------------
Date: Thu, 07 Sep 2006 15:10:23 +0100
From: David Squire <David.Squire@no.spam.from.here.au>
Subject: Re: CPAN 'shell' interface stopped working?
Message-Id: <edp98f$r4t$1@gemini.csx.cam.ac.uk>
Dave Hammond wrote:
> Christian Winter wrote:
>> perl -MCPAN -e "shell"
>> should still work fine.
>
> Oops! Thanks, guys!! Funny, I must have typed that line a thousand
> times in the past 10 years, and I can't recall ever typing "-m" instead
> of "-M". Maybe I should just
>
> alias cpan='perl -MCPAN -e "shell"'
... why not try typing 'cpan'? It's almost certainly already there :)
DS
------------------------------
Date: Thu, 7 Sep 2006 16:40:23 +0000 (UTC)
From: ansok@alumni.caltech.edu (Gary E. Ansok)
Subject: Re: if exsist hash key.. why not finding it???
Message-Id: <edpi1n$csb$1@naig.caltech.edu>
In article <1157630325.704175.77260@i3g2000cwc.googlegroups.com>,
<jason@cyberpine.com> wrote:
>Hello.
>
>I'm trying to merge two files by a common key field.
>
>file1.csv format:
>B1,B2,B3,B4,BK
>
>file2.csv format:
>A1,AK,A3,A4
Any time you have two strings that you think should be identical
but aren't, the first thing you should do is to look at the strings.
Often, one or the other will have extra whitespace (such as a trailing
newline) or otherwise won't contain exactly what you think it does.
If the output will appear on a Web page or any other place where
output might get re-wrapped or where spaces will be difficult to see,
take extra care (I sometimes print out the string length in this case).
> #!/usr/bin/perl
>open FILEC, '>filec.csv' or die "could not open 'matched.csv' $!";
>my %a;
>open FILEA, 'filea.csv' "could not open 'filea' $!";
>while ( <FILEA> ) {
> $_ =~ s/"([^"]*)"/&comma_fixer($1)/ge;
> my @f = split /,/;
> my $key = $f[4];
> #print $key;
> if ( exists $a{$key} )
> {
> print "Duplicate key found in ", $key ," ",$_," ", @f,"\n";
> }
> else
> {
> $a{$key} = \@f;
> }
>}
Here, you could insert
use Data::Dumper;
print Dumper \%a;
to see exactly what keys have been stored in %a.
>open FILEB, 'fileb.csv' or die "could not open 'fileb' $!";
>while ( <FILEB> ) {
> my @b = split /,/;
> my $key = $b[1];
Here, you could insert something like
print "Looking for key >>>$key<<<\n";
> #BELOW IS THE SUSPECT LINE
> if ( exists $a{$key} ) {
> my $m = join ',', $key,
> $a{$key}[2],
> $b[1],
> $b[2],
> $b[3];
> print FILEC "$m\n";
> print "entry found\n";
> }
> else
> {
> # print "key not found ",$key,"\n";
> }
>
>}
>
>close FILEA;
>close FILEB;
>close FILEC;
>
>sub comma_fixer {
> $string = @_[0];
> $string =~ s/,/ /g; ## replace , with blank,
> return $string;
>
>Every single line spits out "key not found".
>What am I doing wrong and is there a better way to approach this?
Check the two strings to verify that they are identical.
I notice that you aren't using chomp() on the data you read from
the input files -- this is probably causing one of your strings to
contain a trailing newline. For more information, do "perldoc -f chomp".
Gary
--
The recipe says "toss lightly," but I suppose that depends
on how much you eat and how bad the cramps get. - J. Lileks
------------------------------
Date: 7 Sep 2006 06:53:26 -0700
From: "deadpickle" <deadpickle@gmail.com>
Subject: Re: IO::Socket server
Message-Id: <1157637206.230087.100280@m79g2000cwm.googlegroups.com>
S=E9bastien Cottalorda wrote:
> Hi,
>
> Here is a full, tested, couple of program that work on an html file.
>
> client_side.pl
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> #!/usr/bin/perl -w
> #
> #
> use strict;
> use IO::Socket;
> $|=3D1;
> my $file =3D
> my $host =3D shift || 'localhost';
> my $port =3D shift || 7890;
> my $sock =3D new IO::Socket::INET(
> PeerAddr =3D> $host,
> PeerPort =3D> $port,
> Proto =3D> 'tcp');
> $sock or die "no socket :$!";
> #--------------/ Socket opened \----------------
> my $filename=3D.....; # the file to be sent by the server side
> my $fileout=3D$filename."_RECEIVED"; # the file in which we should place
> received datas
> unless (open (FH_RECEPTION, ">", $fileout)){
> die "Unable to create $fileout $!";
> }
> print $sock "FILE|$filename\n";
> my @elem=3D();
> my $all_received;
> while (my $line=3D<$sock>){
> chomp($line);
> #
> # Remove the next line in production
> #
> print "RECEIVED>$line\n";
> @elem =3D split /\|/, $line;
> if ($line=3D~/^FIL\|/){
> $elem[1]=3D'' unless (defined $elem[1]);
> print FH_RECEPTION $elem[1]."\n";
> $all_received=3D0;
> }
> elsif ($line=3D~/^EOT\|/){
> print "Normal End of Transmission received\n";
> $all_received=3D1;
> last;
> }
> elsif ($line=3D~/^NACK\|/){
> print "ERROR: $elem[1]\n";
> last;
> }
> else {
> print "Do not understand|$line\n";
> last;
> }
> }
> close($sock);
> close(FH_RECEPTION);
> if ((defined $all_received) and ($all_received=3D=3D1)){
> print "Everything has been received in $fileout\n";
> }
> elsif (defined $all_received) {
> print "some part of the file has been received in $fileout\n";
> }
> exit;
>
>
>
> server_side
> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
> #!/usr/bin/perl -w
> use strict;
> use IO::Socket;
> my $sock =3D new IO::Socket::INET(
> LocalHost =3D> 'localhost',
> LocalPort =3D> 7890,
> Proto =3D> 'tcp',
> Listen =3D> SOMAXCONN,
> Reuse =3D> 1);
> $sock or die "no socket :$!";
> $|=3D1;
> my($new_sock, $c_addr, $buf);
> while (($new_sock, $c_addr) =3D $sock->accept()) {
> my ($client_port, $c_ip) =3D sockaddr_in($c_addr);
> my $client_ipnum =3D inet_ntoa($c_ip);
> my $client_host =3D gethostbyaddr($c_ip, AF_INET);
> print "got a connection from: $client_host"," [$client_ipnum]\n";
> while (defined ($buf =3D <$new_sock>)) {
> chomp($buf);
> if ($buf=3D~/^FILE\|/){
> my $filename =3D (split /\|/, $buf)[1];
> unless (open (FH, "<", $filename)){
> print $new_sock "NACK|File '$filename'
> do not exists\n";
> }
> else {
> while (my $line =3D<FH>){
> chomp($line);
> print $new_sock "FIL|".$line."\n=
";
> #
> # Remove/comment next line in production
> #
> print "SENT>FIL|".$line."\n";
> }
> close(FH);
> print $new_sock "EOT|\n";
> }
> last;
> }
> elsif ($buf=3D~/^QUIT\|/){
> last;
> }
> else {
> print $new_sock "NACK|Command not understood\n";
> last;
> }
> }
> close($new_sock);
> }
> exit;
>
>
>
> Hope this helps again.....
>
> Sebastien
Sorry to keep bothering you like this but I am very new to perl. The
program works great. I want the client script to sleep for 5 seconds
then run and get the file again. I tried entering the sleep value at
the end of the script and removing the exit but all that happens is
that the client sleeps for 5 then closes.
------------------------------
Date: Thu, 07 Sep 2006 11:02:20 -0700
From: Jim Gibson <jgibson@mail.arc.nasa.gov>
Subject: Re: IO::Socket server
Message-Id: <070920061102206899%jgibson@mail.arc.nasa.gov>
In article <1157637206.230087.100280@m79g2000cwm.googlegroups.com>,
deadpickle <deadpickle@gmail.com> wrote:
> Sébastien Cottalorda wrote:
> > Hi,
> >
> > Here is a full, tested, couple of program that work on an html file.
> >
> > client_side.pl
> > ==============
> > #!/usr/bin/perl -w
> > #
[snip]
for(;;) {
> > while (my $line=<$sock>){
> > chomp($line);
[snip]
> > }
sleep(5);
}
> > exit;
> >
>
> Sorry to keep bothering you like this but I am very new to perl. The
> program works great. I want the client script to sleep for 5 seconds
> then run and get the file again. I tried entering the sleep value at
> the end of the script and removing the exit but all that happens is
> that the client sleeps for 5 then closes.
>
Put another loop around the existing while loop as indicated above. The
above will run forever until killed. Modify it as needed.
--
Jim Gibson
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
------------------------------
Date: 7 Sep 2006 06:53:12 -0700
From: "Jorge" <awkster@yahoo.com>
Subject: Re: Numerical sort (Schwartzian xform)
Message-Id: <1157637192.732592.161370@e3g2000cwe.googlegroups.com>
Never heard of Sort::Fields (until now :D) so I just did a ppm install
and will give it a try.
Meanwhile, thanks for all the replies.
Jorge
Uri Guttman wrote:
> >>>>> "JB" == John Bokma <john@castleamber.com> writes:
>
> JB> merlyn@stonehenge.com (Randal L. Schwartz) wrote:
> >>>>>>> "Jorge" == Jorge <awkster@yahoo.com> writes:
> >>
> Jorge> I pass the array to my schwartzian transform sub routine using
> >> this Jorge> call ...
> >>
> Jorge> my @sorted_array = &SchwartzianTransform(' ', ['1n', -1],
> >> @array);
> >>
> >> You don't like Sort::Fields (in the CPAN) for some reason?
>
> JB> Doesn't have your last name in the module name (or any of the
> JB> methods [1]) :-D
>
> neither does sort::maker. it uses ST for the key to select that sort
> style. same for the GRT. :)
>
> uri
>
> --
> Uri Guttman ------ uri@stemsystems.com -------- http://www.stemsystems.com
> --Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
> Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org
------------------------------
Date: 7 Sep 2006 07:32:14 -0700
From: "MattJ83" <mattjones@hotmail.co.uk>
Subject: Re: Pattern Matching and skipping
Message-Id: <1157639534.188890.82970@e3g2000cwe.googlegroups.com>
>
> Sure, you threw out the baby with the bath water. The assignment to
> @lines also goes away if you just delete the line.
>
> The point is, @lines will only ever contain one element, the current
> line minus its line feed. The same would be achieved by (untested)
>
> while ( <LOG> ) {
> chomp;
> if ( /elapsed/ ) {
> my @lines = ( $_);
>
> I seem to remember that a loop over @lines follows. Both the variable
> @lines and the loop can presumably go away too.
>
> Anno
By this do you mean i can replace that looping repetitious code by
using chomp; and ($_); ? Is ($_) just a short hand way of writing the
full variable or do u actually mean do this and then declare the $
variables somewhere else?
------------------------------
Date: 7 Sep 2006 07:41:52 -0700
From: "MattJ83" <mattjones@hotmail.co.uk>
Subject: Re: Pattern Matching and skipping
Message-Id: <1157640112.300398.138480@e3g2000cwe.googlegroups.com>
#!/usr/central/bin/perl
use strict ;
#use warnings;
use DBI;
my @files= </home/mmj19903/logs/*.log>;
foreach my $file (@files) {
open (LOG,</home/mmj19903/logs/*.log>) or die "can't open LOG: $!\n";
while (<LOG>) {
chomp;
if (/updates table/){
my @lines = ( $_); ;
foreach my $info (@lines) {
while (<LOG>) {
chomp;
if (/elapsed/) {
my @lines = ($_);
foreach my $elapsed1 (@lines) {
...........
I presume this is what you mean't by the chomp - or did u mean
something more simple still?
So without the foreach line - i just get a global symbol $info (etc)
requires explicit package name....
------------------------------
Date: Thu, 07 Sep 2006 15:55:24 +0100
From: David Squire <David.Squire@no.spam.from.here.au>
Subject: Re: Pattern Matching and skipping
Message-Id: <edpbss$3gq$1@gemini.csx.cam.ac.uk>
MattJ83 wrote:
> #!/usr/central/bin/perl
> use strict ;
> #use warnings;
> use DBI;
>
> my @files= </home/mmj19903/logs/*.log>;
> foreach my $file (@files) {
>
> open (LOG,</home/mmj19903/logs/*.log>) or die "can't open LOG: $!\n";
Read my earlier response about this line. You are not opening $file.
DS
------------------------------
Date: 7 Sep 2006 08:00:30 -0700
From: "MattJ83" <mattjones@hotmail.co.uk>
Subject: Re: Pattern Matching and skipping
Message-Id: <1157641230.172321.286020@h48g2000cwc.googlegroups.com>
David Squire wrote:
> MattJ83 wrote:
> > #!/usr/central/bin/perl
> > use strict ;
> > #use warnings;
> > use DBI;
> >
> > my @files= </home/mmj19903/logs/*.log>;
> > foreach my $file (@files) {
> >
> > open (LOG,</home/mmj19903/logs/*.log>) or die "can't open LOG: $!\n";
>
> Read my earlier response about this line. You are not opening $file.
>
>
> DS
I wasn't sure what you were gettign at with this line David - it works
for me - this code so far does what i want it to.....it opens the log
file puts the path of the log into a database field, and pulls out the
lines that have the soecific words in them and places these lines ina
database CLOB field. This is what i want - it repeats for each log in
the directory.....
Im a bit reluctant to change the code when this one works ok for me...
?
------------------------------
Date: Thu, 07 Sep 2006 16:03:25 +0100
From: David Squire <David.Squire@no.spam.from.here.au>
Subject: Re: Pattern Matching and skipping
Message-Id: <edpcbt$494$1@gemini.csx.cam.ac.uk>
MattJ83 wrote:
> David Squire wrote:
>> MattJ83 wrote:
>>> #!/usr/central/bin/perl
>>> use strict ;
>>> #use warnings;
>>> use DBI;
>>>
>>> my @files= </home/mmj19903/logs/*.log>;
>>> foreach my $file (@files) {
>>>
>>> open (LOG,</home/mmj19903/logs/*.log>) or die "can't open LOG: $!\n";
>> Read my earlier response about this line. You are not opening $file.
>>
>>
>> DS
>
> I wasn't sure what you were gettign at with this line David - it works
> for me - this code so far does what i want it to.....it opens the log
> file puts the path of the log into a database field, and pulls out the
> lines that have the soecific words in them and places these lines ina
> database CLOB field. This is what i want - it repeats for each log in
> the directory.....
>
> Im a bit reluctant to change the code when this one works ok for me...
It will work so long as there is only one file that matches the pattern
in the glob </home/mmj19903/logs/*.log>. The lines above suggest that
you want to open each of the files in @files in turn. Your code does not
do that. You don't use the variable $file from the loop 'foreach my
$file (@files) {...}' anywhere. What is that loop for then?
DS
------------------------------
Date: 7 Sep 2006 08:10:43 -0700
From: "MattJ83" <mattjones@hotmail.co.uk>
Subject: Re: Pattern Matching and skipping
Message-Id: <1157641843.253650.272350@m79g2000cwm.googlegroups.com>
David Squire wrote:
> MattJ83 wrote:
> > David Squire wrote:
> >> MattJ83 wrote:
> >>> #!/usr/central/bin/perl
> >>> use strict ;
> >>> #use warnings;
> >>> use DBI;
> >>>
> >>> my @files= </home/mmj19903/logs/*.log>;
> >>> foreach my $file (@files) {
> >>>
> >>> open (LOG,</home/mmj19903/logs/*.log>) or die "can't open LOG: $!\n";
> >> Read my earlier response about this line. You are not opening $file.
> >>
> >>
> >> DS
> >
> > I wasn't sure what you were gettign at with this line David - it works
> > for me - this code so far does what i want it to.....it opens the log
> > file puts the path of the log into a database field, and pulls out the
> > lines that have the soecific words in them and places these lines ina
> > database CLOB field. This is what i want - it repeats for each log in
> > the directory.....
> >
> > Im a bit reluctant to change the code when this one works ok for me...
>
> It will work so long as there is only one file that matches the pattern
> in the glob </home/mmj19903/logs/*.log>. The lines above suggest that
> you want to open each of the files in @files in turn. Your code does not
> do that. You don't use the variable $file from the loop 'foreach my
> $file (@files) {...}' anywhere. What is that loop for then?
>
> DS
As far as my limited PERL knowledge takes me (not far) i was under the
impression that that first few lines declares the directory then tells
it to loop the path name of the log file in the directory to the LOGID
column then open the log file and pull those lines (with /elapsed/ etc)
into the corresponding fields. This then repeats for the next log file
and then next.......it is only when the /pattern/ isn't matched that
the log file is not being recorded into the directory......
Thanks for your info...!!
------------------------------
Date: Thu, 07 Sep 2006 16:47:52 +0100
From: David Squire <David.Squire@no.spam.from.here.au>
Subject: Re: Pattern Matching and skipping
Message-Id: <edpev8$9rm$1@gemini.csx.cam.ac.uk>
MattJ83 wrote:
> As far as my limited PERL knowledge takes me (not far) i was under the
> impression that that first few lines declares the directory then tells
> it to loop the path name of the log file in the directory to the LOGID
> column then open the log file and pull those lines (with /elapsed/ etc)
> into the corresponding fields. ...
[snip]
Here is an annotated version of those first few lines:
> my @files= </home/USERNAME/logs/*.log>;
Create an array called @files and initialise it with a list of all the
files or directories that match the pattern "/home/USERNAME/logs/*.log",
i.e. the same things you would see if you typed "ls
/home/USERNAME/logs/*.log" in your shell. This is called a glob.
> foreach my $file (@files) {
For each element of the array @files, create an alias for that element
called $file, and execute the code in the block that follows. You seem
not ever to use this - though if I were you I would.
> open (LOG,</home/USERNAME/logs/*.log>) or die "can't open LOG: $!\n";
Open a file handle LOG whose filename is given by the expression
"</home/USERNAME/logs/*.log>". This glob, identical to the one above, is
used here in scalar context, so what open gets is the next element of
the list in the glob... which means that you code actually does what you
want - to my surprise (I did not know about this behaviour of glob in a
scalar context)!
I still think it would be clearer to write:
my @filenames= </home/USERNAME/logs/*.log>;
foreach my $filename (@filenames) {
open my $LOG, '<', $filename or die "can't open $filename: $!\n";
... # using $LOG wherever you had LOG
}
If you don't do that, your first two lines are redundant - there is
certainly no need to do the glob twice.
DS
------------------------------
Date: 7 Sep 2006 15:48:10 GMT
From: anno4000@radom.zrz.tu-berlin.de
Subject: Re: Pattern Matching and skipping
Message-Id: <4mat9qF5bo9fU1@news.dfncis.de>
MattJ83 <mattjones@hotmail.co.uk> wrote in comp.lang.perl.misc:
>
> >
> > Sure, you threw out the baby with the bath water. The assignment to
> > @lines also goes away if you just delete the line.
> >
> > The point is, @lines will only ever contain one element, the current
> > line minus its line feed. The same would be achieved by (untested)
> >
> > while ( <LOG> ) {
> > chomp;
> > if ( /elapsed/ ) {
> > my @lines = ( $_);
> >
> > I seem to remember that a loop over @lines follows. Both the variable
> > @lines and the loop can presumably go away too.
> >
> > Anno
>
> By this do you mean i can replace that looping repetitious code by
> using chomp; and ($_); ? Is ($_) just a short hand way of writing the
> full variable or do u actually mean do this and then declare the $
> variables somewhere else?
Please use full pronouns.
No, I don't mean you should literally replace your code with mine.
All I'm saying is that my code does the same thing yours does but
without the spurious split.
You should reduce the code much more. I think another branch of
this thread is quite on the mark.
Anno
------------------------------
Date: Thu, 07 Sep 2006 16:50:05 +0100
From: David Squire <David.Squire@no.spam.from.here.au>
Subject: Re: Pattern Matching and skipping
Message-Id: <edpf3d$9rm$2@gemini.csx.cam.ac.uk>
David Squire wrote:
> If you don't do that, your first two lines are redundant - there is
> certainly no need to do the glob twice.
Ah. Not quite, since the loop means you call the second glob the right
number of times. Still, I think it is hard to understand - at least I
have shown that it was for me :)
DS
------------------------------
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 9698
***************************************