<?xml version="1.0" encoding="windows-1252"?>
<node id="514889" title="Re: grep for lines containg two variables" created="2005-12-07 11:41:05" updated="2005-12-07 06:41:05">
<type id="11">
note</type>
<author id="169799">
gjb</author>
<data>
<field name="doctext">
&lt;p&gt;
&lt;code&gt;
  @interesting_lines = grep {/$string1/ xor /$string2/} @log;
&lt;/code&gt;
will do nicely.&lt;/p&gt;

&lt;p&gt;Hope this helps, -gjb-&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; apparently I got the question wrong, see the previous answer or for an alternative syntax:
&lt;code&gt;
  @interesting_lines = grep {/$string1/ and /$string2/} @log;
&lt;/code&gt;
&lt;/p&gt;</field>
<field name="root_node">
514884</field>
<field name="parent_node">
514884</field>
</data>
</node>
