my $ioserver = IO::Socket::UNIX->new(Local => $sock, Type => SOCK_DGRAM, Listen => 15 ) or croak $EVAL_ERROR; sub read_sock { my $sockinput; $ioserver->recv($sockinput,2048); return ($sockinput); } while (1) { my $test = \read_sock ; if ( $test ) { print "$test\n"; }; print "rest der welt\n"; sleep 5; }