in reply to Re^3: move down 2 lines in file?
in thread move down 2 lines in file?
my $linesToSkip = 2; while ( <FILE> ) { next if 0 < $linesToSkip --; # Do something here with the lines of interest. ... }
I'd rather segregate the discarding of header lines (or whatever) from the processing of lines I'm interested in.
my $linesToSkip = 2; my $discard = <FILE> for 1 .. $linesToSkip; while ( <FILE> ) { # Do something here with the lines of interest. ... }
I hope this is of interest.
Cheers,
JohnGG
Update: Fixed typo.
|
|---|