checking return values of a perl program in a batch file

B

brad

I am new to perl and would like to know how to check the return values
of a perl program in a batch file. how can I save the return value of
the perl program and use it to make decisions as to what I should do
next in the batch file?
 
J

Jürgen Exner

brad said:
I am new to perl and would like to know how to check the return values
of a perl program in a batch file. how can I save the return value of
the perl program and use it to make decisions as to what I should do
next in the batch file?

As for the Perl part: you define the return value of the Perl script in the
exit() command, e.g.
exit 123 ;

I personally don't know of any programming language that is called batch. If
you are using the term in the usual generic meaning of "a simple program
that automatically process a whole bunch of jobs", then your question is
impossible to answer because there are dozens and dozens of programming
languages out there that are commonly used to write batch files. You may
want to ask in a newsgroup that deals with whatever language you are using
to implement your batch process.

jue
 
J

Joe Smith

brad said:
I am new to perl and would like to know how to check the return values
of a perl program in a batch file.

I know of at least three types of batch files.
The answer when using COMMAND.COM or CMD.EXE is vastly different that
what would be used for /bin/bash or /bin/tcsh and has absolutely
nothing to do with the answer for MultiProgramming Batch running on
a 36-bit computer.

Check the manual for the command-line interpreter for your specific
Operating System for 'batch' error detection.
-Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top