perliplookupnslookupreverse-dns

Reverse DNS lookup in perl


How do I perform a reverse DNS lookup, that is how do I resolve an IP address to its DNS hostname in Perl?


Solution

  • gethostbyaddr and similar calls. See http://perldoc.perl.org/functions/gethostbyaddr.html