foreach(@array){ push @threads, threads->create(\&execute_ls, $_); } # when you loop thru @threads to join, join will wait for each thread to finish and becoming joinable foreach (@threads) { $_->join(); } # better would be foreach (@threads) { if ( ( $_ -> is_joinable) { $_->join(); } } alternatively you can detach your threads, instead of joining them, and write your return values to shared variables