in reply to Re^9: Net::DNS::Resolver v0.61 output
in thread Net::DNS::Resolver v0.61 output

I did not see any differences when asking for the specific nameserver about some hostame. However, I was able to fix this problem. Having the debug and recurse options on did not point me in the right direction b/c I did not see the method ptrdname in the debug output.

FIX WAS: I needed to change address method to ptrdname method. I found this using dumper on the $rr variable. Thank you for your persistence and help! :)

my $res = Net::DNS::Resolver->new( nameservers => [qw(ns7.xx.com xx.xx.xx.com)], recurse => 0, ## dont do recursive lookups debug => 0, ); my $query = $res->search("10.xx.xx.55"); use Data::Dumper; #print Dumper($query); #exit; if ($query) { foreach my $rr ($query->answer) { next unless $rr->type eq "PTR"; ## skip record if not eq PTR + ## print $rr->ptrdname, "\n"; print Dumper($rr); } } else { warn "query failed: ", $res->errorstring, "\n"; } #for my $key (keys %ns7IP) { # print $key,' => ',join "\n\t", sort @{$ns7IP{$key}},"\n"; #} print "\n"; "DNS_results.plx" 71 lines, 2813 characters

root@xxxxx(R3 Prod):/home/ # perl DNS_results.plx sap005.alxxxmeX.com

$VAR1 = bless( { 'rdlength' => 22, 'ttl' => 2195, 'name' => '55.xx.xx.10.in-addr.arpa', 'ptrdname' => 'sap005.alxxxsmeX.com', 'class' => 'IN', 'type' => 'PTR', 'rdata' => 'sap005 alarixxxxx' }, 'Net::DNS::RR::PTR' );