while ( my @ready = $select->can_read()) { ... }; #### sleep 2; # give time to child process while ( my @ready = $select->can_read()) { ... }; #### my @children = get_child_pids(); # fake while (@children) { while ( my @ready = $select->can_read()) { ... }; @children = get_child_pids(); # fake sleep 5; # let's see if the remaining children will produce output };