> > From: [EMAIL PROTECTED]
> > open (IN, "a.txt") ;
> > while (<IN>) {
> > chomp ($line = <>);
> > # $line contains line from a.txt
>
> No $line contains a line from a file whose name is in @ARGV or from
> STDIN. You wanted
> $line = <IN>
> !!!
No ... :-)
The "while(<IN>)" reads a line into $_. So, just "chomp;" is required inside
the loop.
"$line = <IN>" would get the next line from the file, and $line would only
contain every other line of IN as the loop executed ...
I didn't see the beginning of this thread, if the object was to read every
other line, then disregard this message ...
Rodney
_______________________________________________
ActivePerl mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/activeperl