my ... for ...; is not valid Perl.
Well, it seems to compile and run with no warnings or errors.
use strict; use warnings; my $discard = <DATA> for 1 .. 2; print while <DATA>; __END__ Header 1 Header 2 Data 1 Data 2 Data 3
$ ./spw770971 Data 1 Data 2 Data 3 $
Please could you explain in what way it is not valid.
Cheers,
JohnGG
In reply to Re^3: skipping the first line of a file
by johngg
in thread skipping the first line of a file
by Angharad
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |