Running another program in current program

From: Durai (tech_durai_at_yahoo.com)
Date: 04/29/04


To: <beginners@perl.org>
Date: Thu, 29 Apr 2004 15:38:26 +0530

Hello All,

In shell script file, I can call another program & checked the exit status.
Like:

./prog2
if [ $? -ne 0 ]
then
        echo "Error"
        exit
fi

How to do in perl?

ANy help much appreciated.

Regs,
Durai.

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.665 / Virus Database: 428 - Release Date: 4/21/2004


Relevant Pages

  • Re: Shifting error codes
    ... and related macros available inside a perl script. ... result of pressure from the VMS people (VMS has W*, but doesn't use exit ... to fix perl than to fix all the scripts assuming Unix semantics for $?. ...
    (comp.lang.perl.misc)
  • Re: parsing a variable length record from a mixed format file
    ... test file isn't 45 chars, ... Please see other people's comments on cleaning up your Perl. ... exit 1;} ... This won't confuse the computer but it sure does ...
    (comp.lang.perl.misc)
  • Re: parsing a variable length record from a mixed format file
    ... test file isn't 45 chars, ... Please see other people's comments on cleaning up your Perl. ... exit 1;} ... This won't confuse the computer but it sure does ...
    (comp.lang.perl.misc)
  • Re: Shifting error codes
    ... and related macros available inside a perl script. ... result of pressure from the VMS people (VMS has W*, but doesn't use exit ... codes looking anything like the POSIX ones). ... I hope that's a documentation bug. ...
    (comp.lang.perl.misc)
  • Re: Shifting error codes
    ... and related macros available inside a perl script. ... result of pressure from the VMS people (VMS has W*, but doesn't use exit ... documented behavior. ...
    (comp.lang.perl.misc)