in reply to how to tell when socket breaks?

IO::Select can be used to monitor multiple sockets at once.