I have to run my compiler on around 12000 files which are unit testcases. For this, i have a perl script "a.pl" which internally call another perl script "b.pl". "b.pl" invokes compiler_exe on the specified file. "a.pl" reads a file named files.txt containing list of file names on which the exe is to be invoked. Filenames are read from the files.txt one by one and its name is passed to "b.pl". "b.pl" invokes an exe on the file. The files.txt contain around 12000 file names. I need to two scripts because b.pl is like a wrapper for my compiler_exe which does some other things like setting options for the compiler to run with. However the problem is that, i get errors like "Access is denied" or "process cannot access the file as its being used by another process" on only FEW files(around 50 files).These 50 files are not the same always. The 12000 files are c files and they are not accessed by any other program or process. Perl : Active perl 5.8.8 for windows. On linux: There is no issue, everything works properly.