> You need to quotemeta() the string so it can be used literally in
> a regex.
> 
> >The line that I'm looking in is (almost) such as:  $original_ip_address = 
> >deny+qfe1+tcp+*-*+0.0.0.0
> >(can ya guess this is a firewall packet screen?)
> >
> >The syntax I'm using is:
> >
> >if ($looking_for =~ /$original_ip_address//) { $i += 1 }
> >    print "You Found A Match !\";
> 
> The syntax you need will contain /\Q$original_ip_address\E/ (you have an 
> extra / above, btw).

Also ... don't you want to be doing

        if ($original_ip_address =~ /\Q$looking_for\E/)

That way you're finding instances of $looking_for inside
$original_ip_address, rather than the other way around.

Dan


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to