Reverse DNS lookup in perl

Joakim picture Joakim · Sep 17, 2008 · Viewed 28.9k times · Source

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

Answer

JBB picture JBB · Sep 17, 2008

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