in reply to multiple socket streams

Another solution that didn't come up is using nonblocking sockets. See the Blocking argument to IO::Socket::INET.