checking return values of a perl program in a batch file

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • brad

    checking return values of a perl program in a batch file

    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ürgen Exner

    #2
    Re: checking return values of a perl program in a batch file

    brad wrote:[color=blue]
    > 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?[/color]

    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


    Comment

    • Joe Smith

      #3
      Re: checking return values of a perl program in a batch file

      brad wrote:
      [color=blue]
      > I am new to perl and would like to know how to check the return values
      > of a perl program in a batch file.[/color]

      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 MultiProgrammin g 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/

      Comment

      Working...