in reply to when reading a file how to print a line one above the current line??
open my $fh => $file or die "Failed to open $file: $!\n"; my $last = ""; while (<$fh>) { print "$last$_" if /ALARM:/; $last = $_; } close $fh; [download]
Abigail