Quoteuse warnings; use strict; use IO::Socket; my $ip = "127.0.0.1"; my $port = "10"; my $msg = "Hallo"; my $sock = IO::Socket::INET->new(PeerPort => $port, PeerAddr => $ip, Proto => udp) or die "Fail: $@\n"; print $sock "$msg";