How to search multiple criteria in a record using Perl regex?
Posted on 2011-02-20
I would like to search multiple criteria in a record using Perl regular expression.
For example, I have the following record
I would like to search all records that start with @text and the number line 1. The problem is that there are variable lines between the two criteria of @text and 1.
I started out with the following code but not working...
# make it easy to change delimiters to whatever you want
my $delim = '|';
open FH, '<', 'scsi_test' or die $!;
Problem, its only printing out the first line and not going through the entire log file