if ($s_ip) { $ip = $s_ip . ":"; } else { $ip = "port "; } my $s_socket = IO::Socket::INET->new( Proto=>"udp", LocalAddr=>"$s_ip", LocalPort=>"$s_port" ) or die ("\nCan't setup UDP socket on $ip:$s_port $!\n"); print("Opening UDP listen socket on $ip$s_port ... ok\n"); while ($timeout % 60 == 0) { print "hier"; if(IO::Select->new($s_socket)->can_read(2)) { # 2 second timeout while (my $rc = $s_socket->recv($s_output, 1024) ) { $buffer .= $s_output; } print $buffer; $timeout = 0; # $s_socket->recv($s_output, 1024); # print $s_output; } else { $timeout++; } print $timeout; }