On Windows servers (I've tested 2008 R2 and 2012 R2) we noticed different behavior in execution of Perl scripts that are called from batch.
Consider a primitive batch file as follows:
:beginlbl
call path\script.pl
goto :beginlbl
Sooner or later (sometimes after just a few script executions on other occasions after hundreds of executions) there will be an error message: "Windows cannot access the specified device, path, or file. You may not have the appropriate permissions to access the item."
If the second line of the code is modified to look as follows:
call perl path\script.pl
(Note the executable name before the script.) The script will run forever without issues.
What is Windows executing differently in the two cases outlined above?