use threads; # concurrently move all the files to the directory passed in on the command line my $j = 0; for (1..10) { $j++; threads->create(\&mytest); } #Subroutine that does the file copies. This is called concurrently. sub mytest { my $result = `mv ./a_file$j /home/user/dir 2>&1`; }