use threads; ## start the first command going my $t1 = async { return qx[ ... ]; }; ## Start the second command running. my $t2 = async { return qx[ ... ]; }; ## wait for the first to finish and retrieve the output my $output1 = $t1->join; ## wait for the second to finish and retrieve the output my $output2 = $t2->join;