in reply to Working in parallel

See Simple threaded chat server. You can share filhandles across threads thru the fileno's. That make it easy to use some sort of select or filehandle-watch in the main thread, by sharing the filhandles thru threads:shared variables.

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku