Perl 查询域名对应的 IP 地址 2015/12/14 17747 use Socket; $site_name = 'www.oschina.net'; $address = inet_ntoa(inet_aton($site_name)); print "The DNS address of www.oschina.net is $address";