On 2/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
Tom your code works fine. But I was tring to understand why "!~" fails above.
> if ($result !~ /$rdns/ix) { That's checking whether $rdns, as a pattern, does not match the string in $result.
That's why it "fails": It does not mean what you think it means. It means, use $rdns as a pattern, to try to match the string in $result. Then it returns false if the match succeeded or true if the match failed (just the boolean opposite of what =~ would have done). Here's another way to write it: if (not ($result =~ /$rdns/ix) ) { But you originally said "I want to make sure $result is NOT part of $rdns." That's not the same as making sure that $rdns is not part of $result. Does this clear things up? Cheers! --Tom Phoenix Stonehenge Perl Training -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] http://learn.perl.org/