my $Qstdin = new Thread::Queue; async { $Qstdin->enqueue( $_ ) while defined( $_ = ); }->detach; ... while( 1 ) { if( my @readers = $selector->can_read( 0.1 ) ) { ## See what they have to say } elsif( my @writers = $selector->can_write( 0.1 ) { ## Tell'em what they need to know } elsif( my @exceptors = $selector->has_exception( 0.1 ) { ## Deal with their tantrums } else { while( $Qstdin->pending ) { my $kbinput = $Qstdin->dequeue; ## do whatever } } }