in reply to Re: Did I create a concurrent program?
in thread Did I create a concurrent program?

Your mytest routine will run concurrently, but you have a race condition. You should pass the value of $j into the thread at thread creation time instead of accessing a global variable. As your threads run, there is a chance that two threads will try to use the same value in $j to move a file.
Aren't Perl variables supposed to be non-shared by default?
  • Comment on Re^2: Did I create a concurrent program?