#!/usr/bin/perl -w use Socket; my $hostname = "www.perlmonks.com"; my $ipAddress = inet_ntoa(inet_aton($hostname)); print "IP address of $hostname is $ipAddress.\n";