in reply to text manipulation
Otherwise, if you need to evaluate the data before knowing which lines to remove, you're looking at a regular expression.# read all the lines in the file into an array @all_lines = (<INFILE>); # grab only the lines you want @stripped_lines = splice(@all_lines, 3, scalar(@all_lines)-5); # output to the new file print OUTFILE @stripped_lines;
|
|---|