Utiliser le module IO::Socket :
if(my $sock = IO::Socket::INET -> new ( Proto => 'udp', PeerPort => $port, PeerAddr=>$server)){ $sock -> send($msg) or warn $!; $sock -> recv($return,$max_len) or warn $!; $sock -> close() or warn $!; }