in reply to parsing large files for something
my $buffer; while (<$fh>) { $buffer = $_ if /$regex1/; print $buffer if /$regex2/; } [download]