while(@ready = $sel->can_read) { foreach $fh (@ready) { my $rr = <$fh>; exit if ( not defined $rr ); print $rr; } }