in reply to resolve IP address into domain name

First you convert the string rep of the IP address to an internal (long word) form, then look up the domain name using standard internet library functions:
use Socket; # for AF_INET for my $ip_s ( @ip_strings ) { my $hostname = gethostbyaddr( inet_aton($ip_s), AF_INET ); }