Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

How to prevent the perl script from skipping execution of certain batch files?

by listentome (Initiate)
on Feb 23, 2010 at 09:30 UTC ( #824809=perlquestion: print w/ replies, xml ) Need Help??
listentome has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am running a suite of batch files and my perl script helps in reading the path of the batch file from a text file and then executes the same. The problem I am facing is that at times the script prints it as passed though the batch file has not been executed. How do I prevent this from happening?

Comment on How to prevent the perl script from skipping execution of certain batch files?
Re: How to prevent the perl script from skipping execution of certain batch files?
by moritz (Cardinal) on Feb 23, 2010 at 10:33 UTC
    You need to check if your perl script actually executed something. How that works depends on how the script runs the batch files. If you do it with system, the documentation describes in detail how you can check for errors.
Re: How to prevent the perl script from skipping execution of certain batch files?
by cdarke (Prior) on Feb 23, 2010 at 10:35 UTC
    You need to find out why the batch file has not been executed. You may need to test $? and/or $! or even $^E, depending on how you are running the batch files. There are many ways of doing that, and without seeing your code we can only guess.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://824809]
Approved by Ratazong
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others wandering the Monastery: (4)
As of 2014-09-22 02:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    How do you remember the number of days in each month?











    Results (177 votes), past polls