123456789101112131415161718
use Encode::Punycode;use Encode;use Socket;print getip( encode('Punycode', 'müller' ) . '.de' );sub getip { my ($host) = @_; my $addr = gethostbyname( $host ); die "Hostname $host doesn't exist.\n" unless $addr; return inet_ntoa( $addr );}^ZHostname xn--mller-ha.de doesn't exist.