my @threads; foreach my $suite (@suite) { push @threads, Thread->new(\&runThread, $suite); } foreach my $t (@threads) { push @outputLog, @{$t->join}; } sub runThread { my $self = Thread->self; logInfo("Thread #", $self->tid, " (@_) started..."); my @output = qx{start JVM instance here}; checkExitValue(); return \@output; }