in reply to Re^2: reading several lines in a gulp
in thread reading several lines in a gulp

Yes, I didn't think of that. Maybe this would be better:
sub gulp { my ($file, $count) = @_; my @lines; for (1..$count) { push @lines, scalar <$file>; last if eof $file; } return @lines; }