http://qs1969.pair.com?node_id=771115


in reply to Re: skipping the first line of a file
in thread skipping the first line of a file

my $discard = <$fh> for 1 .. 1; # $discard no longer in scope here.

I don't get the point, in what sense is your example better than this?

<$fh>;

or

<$fh> for 0..2;

The diamond operator doesn't use $_ as default, so using it in "void" context silently reads the next line of the filehandle

citromatik