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

Interesting, by using the count-up of the scalar @lines instead of counting down of $count it is naturally proof against funny (negative) values of $count and works correctly for an initial value of zero.

If scalar @lines is efficient and "free" (it knows the size anyway) it might even be faster than incrementing $count.