while( my $sel = $select->can_read ){ if($sel->accept){spawn a new connection maybe by forking/threading or adding to the select array } if( $sel->is_connected){ #check for connection status if ($sel->can_write){ etc } } }