On Monday, May 6, 2002, at 03:09 , HENRY,MARK (HP-Roseville,ex1) wrote:

> Hi All,
>
> A question regarding process mgmt.
>
> Using the system() call, you can call an os command a test for the return
> value of the command in question, proceeding based on the return value.
>
> However, using backquotes, is there a way to do the same?  This method
> returns the output of the program back to the script, but not the return
> value..  any suggestions?

my $cmd = 'theUseualsHere 2>&1; echo $?';

and parse it out of the stream

or you can just try the old fashion way:

        my $ret = `$cmd`;
     my $error_code_Oh_Last_cmd = $?;

I got bit by the fact that this worked, what a couple of weeks ago?

ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to