while (1) { $pm->start and next; ... # do child tasks here ... $pm->finish; }