Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > checking return values of a perl program in a batch file

Reply
Thread Tools

checking return values of a perl program in a batch file

 
 
brad
Guest
Posts: n/a
 
      01-15-2004
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?
 
Reply With Quote
 
 
 
 
Jürgen Exner
Guest
Posts: n/a
 
      01-15-2004
brad wrote:
> 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


 
Reply With Quote
 
 
 
 
Joe Smith
Guest
Posts: n/a
 
      01-19-2004
brad wrote:

> 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
--
I love my TiVo - http://www.inwap.com/u/joe/tivo/
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
perl values for batch script to use Slickuser Perl Misc 9 04-11-2009 03:27 PM
batch file for checking/restarting applicaions dale MCSA 0 12-03-2007 04:19 PM
WX call a pywx program from a program, and return values Marcpp Python 1 06-24-2007 11:11 PM
Checking return values for errors, a matter of style? Johan Tibell C Programming 66 08-07-2006 05:36 PM
executing multiple perl programs sequentially and checking return values for errors brad Perl Misc 3 01-15-2004 09:39 PM



Advertisments