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 reply to Re: grep for lines containg two variables
by gjb
in thread grep for lines containg two variables
by smoss74
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |