foreach(1..$number_of_iterations) { my $t = threads->new(\&action); sleep $whatever; $t->join(); }