Fellow Monks i come to you in a bit of a pickle. I have been asked to parse some access logs and give feedback on who is using a utility ( the logs are very apache like) i have broken it down to where i can get day and ip and all that but they didn't like having the "ip address" cause they don't know what that ip is so i am using Net::Nslookup. I can get type => 'A' records and have turned on all the debugging and the dns is returning but i am not getting a value back i have even thought of the fact that it may be an arrary and haven't found anything there either.
I have even created some test code and it does not work. I will use the test code to post here as it is much smaller and has the same issue:
my $ip = nslookup( domain => 'www.yahoo.com', type => 'A' );
my $fqdn = nslookup ( domain => $ip, type => 'PTR' );
print "$ip -> $fqdn \n";
Performing 'A' lookup on `www.yahoo.com' at ./test.pl line 9
Performing 'PTR' lookup on `188.8.131.52' at ./test.pl line 11
;; search(184.108.40.206, PTR)
;; setting up an AF_INET() family type UDP socket
;; answer from 220.127.116.11:53 : 251 bytes
;; HEADER SECTION
;; id = 46054
;; qr = 1 opcode = QUERY aa = 0 tc = 0 rd = 1
;; ra = 1 ad = 0 cd = 0 rcode = NOERROR
;; qdcount = 1 ancount = 1 nscount = 5 arcount = 5
;; QUESTION SECTION (1 record)
;; 18.104.22.168.in-addr.arpa. IN PTR
;; ANSWER SECTION (1 record)
22.214.171.124.in-addr.arpa. 1166 IN PTR f1.www.vip.re1.yahoo.com.
;; AUTHORITY SECTION (5 records)
76.147.69.in-addr.arpa. 171250 IN NS ns2.yahoo.com.
76.147.69.in-addr.arpa. 171250 IN NS ns3.yahoo.com.
76.147.69.in-addr.arpa. 171250 IN NS ns4.yahoo.com.
76.147.69.in-addr.arpa. 171250 IN NS ns5.yahoo.com.
76.147.69.in-addr.arpa. 171250 IN NS ns1.yahoo.com.
;; ADDITIONAL SECTION (5 records)
ns5.yahoo.com. 51462 IN A 126.96.36.199
ns4.yahoo.com. 22807 IN A 188.8.131.52
ns3.yahoo.com. 22807 IN A 184.108.40.206
ns2.yahoo.com. 22807 IN A 220.127.116.11
ns1.yahoo.com. 77787 IN A 18.104.22.168