#! perl -slw use strict; use threads; my( @t, @r ); push @t, async { `dir /s c:` }; push @t, async { `dir /s d:` }; push @t, async { `dir /s p:` }; print "doing other stuff..." for 1 .. 10; # get and print the results. push @r, $_->join for @t; print for @r;