in reply to keeping open stateful connections.

You aren't overly explicit, but it sounds like IO::Select or maybe IO::Poll would be what you're after.

Makeshifts last the longest.