All, 

Why is it when I turn off debug mode, I get no output?
I was expecting output similar to what nslookup shows for a simple query. My 
goal is to look up by NAME and by IP within 2 domains to determine success and 
failure.

use strict;
use warnings;
use Carp;

<snip>


my $res = Net::DNS::Resolver->new(
    nameservers => [qw(nnnnn.com xxxxx.com)],
    recurse     => 0,
    debug       => 1,
);

my $query = $res->query("CLIENT IP");

  if ($query) {
      foreach my $rr ($query->answer) {
          next unless $rr->type eq "A"; ## Skip if not a host address record ##
          print $rr->address, "\n";
      }
  }
  else {
      warn "query failed: ", $res->errorstring, "\n";
  }



thank you!




__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com

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


Reply via email to