checking return values of a perl program in a batch file

Discussion in 'Perl' started by brad, Jan 15, 2004.

  1. brad

    brad Guest

    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?
     
    brad, Jan 15, 2004
    #1
    1. Advertising

  2. 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
     
    Jürgen Exner, Jan 15, 2004
    #2
    1. Advertising

  3. brad

    Joe Smith Guest

    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/
     
    Joe Smith, Jan 19, 2004
    #3
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ahmad Sabry

    get values from asp pass to batch file !!!

    Ahmad Sabry, Nov 22, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    362
    Ahmad Sabry
    Nov 22, 2006
  2. Johan Tibell
    Replies:
    66
    Views:
    1,048
    Chris Torek
    Aug 7, 2006
  3. Marcpp
    Replies:
    1
    Views:
    789
  4. brad
    Replies:
    3
    Views:
    145
    pkent
    Jan 15, 2004
  5. Slickuser

    perl values for batch script to use

    Slickuser, Apr 7, 2009, in forum: Perl Misc
    Replies:
    9
    Views:
    428
    Ron Bergin
    Apr 11, 2009
Loading...

Share This Page