I have a network script running, but after some time it stops responding. The network connection is closed, but the script process is still running. I'm using IO::Socket::INET module to make a filehandle-like socket ;) How can I make the script to kill itslef if the network link is dropped? I tried adding option 'Timeout' when creating the new $socket object, but then the script wont run at all.