But I'll bet you don't have @LINES containing all 3 words separated by 2 '&' symbols. You need to break this up into:

if($line =~ /$pattern1/ && $line =~ /$pattern2/) {
...
}

or something similar.

On Apr 11, 2006, at 4:15 PM, Sonika Sachdeva wrote:



my $querystring="$str1 && $str2 && $str3";

foreach (@LINES){
        push @output,$_ if /$querystring/ ;
        }

does not work even if I have @LINES containing all 3 words.


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to