sub thr { my $file = shift; system(qw/tar xf/, $file); } for my $file (@files) { launch_thread(\&thr, $file); }