#! perl -slw use strict; use threads; #... my $t1 = async{ `perl -e"print, sleep 1 for 1 ..10"` }; my $t2 = async{ `perl -le"print, sleep 1 for 'a'..'z'"` }; #... my $output1 = $t1->join; my $output2 = $t2->join; print for $output1, $output2;