$socket = IO::Socket::INET->new( PeerAddr => $hostname, PeerPort => $portnumber, Proto => 'udp' ) || die "socket: $@"; my $msg = ""; my $ip = inet_aton($hostname); my $port = sockaddr_in($portnumber, $ip); send($socket, $msg, 0, $port) == length($msg) or die $!; my $msg_insert; my $max = 30; my $port_insert = recv($socket, $msg_insert, $max, 0) or die "recv:$!"; my ($portno, $ipaddr) = sockaddr_in($port_insert); my $host = gethostbyaddr($ipaddr, AF_INET); print "$host($portno) sagte: $msg_insert";