my @threads; foreach $host (@syshost) { push @threads, threads->new(\&runSeries, $host); } $_->join for @threads;