use Socket; my $addr = inet_ntoa scalar gethostbyname $host;