use Socket; my $packed_ip = gethostbyname('slashdot.org'); my $ip = inet_ntoa($packed_ip); print "$ip\n";