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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: grep for lines containg two variables
by ikegami (Patriarch) on Dec 07, 2005 at 16:50 UTC | |
by reasonablekeith (Deacon) on Dec 07, 2005 at 16:57 UTC | |
|
Re^2: grep for lines containg two variables
by reasonablekeith (Deacon) on Dec 07, 2005 at 16:45 UTC |