How do I perform a reverse DNS lookup, that is how do I resolve an IP address to its DNS hostname in Perl?
gethostbyaddr and similar calls. See http://perldoc.perl.org/functions/gethostbyaddr.html