in reply to grep for lines containg two variables
will do nicely.@interesting_lines = grep {/$string1/ xor /$string2/} @log;
Hope this helps, -gjb-
Update: apparently I got the question wrong, see the previous answer or for an alternative syntax:
@interesting_lines = grep {/$string1/ and /$string2/} @log;
In Section
Seekers of Perl Wisdom