in reply to Need a better way to count input lines
You need the scalar there, because you only want to get one line at a time.# while (not eof FILE) { ... } # or... until (eof FILE) { my (@lines) = map scalar <FILE>, 1 .. 3; # work with $lines[0], $lines[1], $lines[2] }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Need a better way to count input lines
by Theo (Priest) on May 07, 2004 at 20:23 UTC |