my $previous; open F, "< /tmp/log.diff" or die "Unable to open file : $!\n"; while (<F>) { chomp; if (m/ERROR/) { print CSVFILE, "$previous\n$_\n"; } $previous = $_; }
In reply to Re: need to extract top and bottom lines...
by zejames
in thread need to extract top and bottom lines...
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |