I have a growing list of regular expressions that I am using to parse through log files searching for \"interesting\" error and debug statements. I\'m currently breaking th
You might want to get rid of the large if statement:
my @interesting = (
qr/Failed in routing out/,
qr/Agent .+ failed/,
qr/Record Not Exist in DB/,
);
return unless $line =~ $_ for @interesting;
although I cannot promise this will improve anything w/o benchmarking with real data.
It might help if you can anchor your patterns at the beginning so they can fail more quickly.