I tested this on a file of 11 lines and one of 9. Worked both ways. If you don't care about uninitialized value errors, you can leave out the local.local $.; # make sure you're in a restrictive block while ($. < 10) { push @lines, scalar <IN>; last if eof(IN); }
In reply to Re: Reading multiple lines?
by chromatic
in thread Reading multiple lines?
by rdw
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |