Rob Dixon wrote: > > Tim Wolak wrote: >> >> if($box =~ m/"$tim"/){ > > Do you intend the quotes? If the lines from the original hosts.deny file > (in @boxes) have IP addresses in quotes then you're OK, but otherwise > take them out. This is my best guess as to why your code isn't working. > Also, you really need to escape the dots in $tim, otherwise they'll match > any character instead of literal dots. > > if ($box =~ /\Q$tim/) {
That won't work correctly either. If $box contains '1.2.3.45' and $tim contains '1.2.3.4' then they will "match" although they aren't the same IP address. John -- use Perl; program fulfillment -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>