use threads; my @thr = (); for my $i (1..5) { push @thr, threads->create('run_command'); } for my $t (@thr) { $t->join } sub run_command { system("DoThis.exe"); }