Mj1234 has asked for the wisdom of the Perl Monks concerning the following question:

Hello Monks,

I have a batch1.bat which executes multiple perl files. Similarly I have batch2.bat,batch3.bat etc to executes other perl files.

I have one main batch file MainBatch.bat which triggers all my batch files mentioned above.

When I individually run the the batch files I don't get any error but when I run the Main batch file which triggers the same files I get perl.exe not working at the end of execution of one of the files. I am not sure why this is happening.Also this happens randomly and not always which is making it hard to debug to see when this occurs. When does the perl.exe not working error occur usually?

Replies are listed 'Best First'.
Re: perl.exe stopped working
by Laurent_R (Canon) on Sep 07, 2016 at 06:29 UTC
    perl.exe usually works. This is likely to be an environment problem with your batch files. I am afraid it will be difficult to help if you don't supply additional details about what your batch files do and about how Perl is called in them.
      Ok thanks I will check the environment.
Re: perl.exe stopped working
by Anonymous Monk on Sep 07, 2016 at 06:47 UTC
Re: perl.exe stopped working
by soonix (Chancellor) on Sep 07, 2016 at 09:48 UTC
    It is difficult to find out what's causing the dreaded "<program name> has stopped working" error. Suggestions include low memory, driver problems, or "Data Execution Prevention". Take a look into the "application" event log, perhaps it has useful Information…
      Is there a way I get the perl trace so that I will know which file is causing this?

        It would probably be more useful to identify which batch file is failing; that will help with identifying the environmental issue. Add the following to each batch file, perhaps right before invoking perl.exe:

        echo %0 > C:\Users\Mj1234\working set >> C:\Users\Mj1234\working
        But God demonstrates His own love toward us, in that while we were yet sinners, Christ died for us. Romans 5:8 (NASB)