in reply to Can I timeout an accept call?

For timeout on accept() you can also use the "Timeout => $second" option when creating your socket (IO::Socket::INET):
# create a socket with a 10 second timeout my $server_socket = IO::Socket::INET->new( LocalPort => 1234, Timeout => 10 ); my $client_socket = $server_socket->accept(); if( not defined $client_socket ) { print "Timeout ...\n"; } else { print "Process request ...\n" }