in reply to TCP Server timeout

There is a timeout parameter you can pass to IO::Socket::INETs constructor (at least in the current version).

And there is IO::Socket::INET::Daemon, a simple tcp daemon, also with a timeout parameter. ...Daemon seems to be dependent only on IO::Socket::INET and IO::Select.

And you might use IO::Select directly to add a timeout to your server code.