用perl来查询网站ip地址

#!/usr/bin/perl

use Socket;

my $host = "www.biocloudservice.com";
my $ip = inet_ntoa(scalar gethostbyname($host || 'localhost'));

print "The IP address of $host is: $ip\n";