in reply to skip lines
Perhaps you could make use of the flip-flop operator (..) to push lines onto your @data array from the occurence of the "Parameter" line through to the end of file. Given this data file:-
Header Line 1 Header Line 2 Third Header Line Parameter line here and the rest of the data follows
This code:-
use strict; use warnings; my $dataFile = q{spw850417.data}; open my $dataFH, q{<}, $dataFile or die qq{open: < $dataFile: $!\n}; my @data; while ( <$dataFH> ) { push @data, $_ if m{^Parameter} .. eof $dataFH; } close $dataFH or die qq{close: < $dataFile: $!\n}; print @data;
Gives this output:-
Parameter line here and the rest of the data follows
I hope this is something along the lines of your requirement.
Cheers,
JohnGG
|
|---|