Utiliser le module IO::Socket :
$sock = IO::Socket::INET -> new ( LocalPort => $server_port, Proto => 'udp') while(1) { while($sock -> recv($receipt, $max_len)) { my($port,$ip) = sockaddr_in($sock -> peername); my $host = gethostbyaddr($ip,AF_INET); $sock -> send($msg); } }