my $several = ...; my @lines; push @lines, $_ while @lines < $several && defined($_ = <$file>);
In reply to Re: reading several lines in a gulp
by JavaFan
in thread reading several lines in a gulp
by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |