my $pm=new Parallel::ForkManager($tc-1); for (my $c=1;$c<$tc;$c++){ $pm->start and next; my $child_dbh = $dbh->clone(); $dbh->{InactiveDestroy} = 1; .... $child_dbh->disconnect or die("Couldn't disconnect"); $pm->finish; } $pm->wait_all_children; ----