Dear Monks,
I normlly use Net::DNS to get the ip address of hostname. But now I need Hostname from IP address. i.e if I provide 69.147.76.15 then it should reurn me www.yahoo.com. Any suggestions please?
Update
After looking into gethostbyaddr help. I tried following to get "www.yahoo.com" (and Not "f1.us.www.vip.ird.yahoo.com").
my ($name,$aliases,$addrtype,$length,@addrs) = gethostbyaddr(inet_aton
+("69.147.76.15"), AF_INET);
print $name."\n";
print $aliases."#".$addrtype."#".$length."\n";
I am expecting "www.yahoo.com" in the second line of output (i.e. $aliases), Am I doing something wrong?