in reply to How to serve multiple socket clients Perl

See the example at the end of perldoc IO::Select . Adding *STDIN to the select object will allow you to also process inputs from the terminal.

This is the kind of problem that fits right into the wheelhouse of the various async modules - they do all the dirty work for you. Here's a list of some of them (from the Freenode IRC #perl channel):

"Asynchronous event-driven IO is awesome in Perl with POE, Future/IO::Async, IO::Lambda, Mojo::IOLoop, Reflex, Promises, AnyEvent and Coro, among others. Maybe not AnyEvent. Or Coro."

  • Comment on Re: How to serve multiple socket clients Perl