I have massive log files from which I want to filter out lines containing phrases out of a list. So, I have put the words in an array and for every line, I have to go through a foreach loop.
my @phrases = ( 'phrase1', 'phrase2', 'phraseN');
foreach my $phrase (@phrases)
print if (/$phrase/);
However this is very slow. Any way I could make it fast?