in reply to Perl:how to find multiple strings

I can't cope with your code - blame it on Rio - code tags notwithstanding and I don't believe it would run at all without compilation errors, but I do see some definite holes I can categorise...
my $matches = grep ... foreach ( @matches ) { ...
should be my @matches. // are pattern match delimiters but the enclosed expression is not likely to be accepted as a pattern. Perhaps you could tell us what strings in the logfile you are trying to detect.

One world, one people