in reply to Re^2: searching for multiple lines from outfile and printing them all in the final outfile
in thread searching for multiple lines from outfile and printing them all in the final outfile

If the lines you require are consecutive, then you could use the range operator to do it along the lines of i.e. untested...
use warnings; use strict; use autodie; open INFILE, "<infile"; open OUTFILE, ">outfile"; while (<INFILE>) { print OUTFILE if /start regex/ .. /end regex/; } close INFILE; close OUTFILE;
A user level that continues to overstate my experience :-))
  • Comment on Re^3: searching for multiple lines from outfile and printing them all in the final outfile
  • Download Code