Hi,
     I am running several commands within my perl script (on AIX 4.3.3).
These commands include find, chmod, etc.
What I am wondering is if anyone has a sample script kicking around where
they execute the command and check the return code, grabbing any output
(stderr or stdout) and printing it in the error message.

My problem right now is I am executing the commands and piping the output
within the open command:
open( INPUT, "$findCMD|" )

If the find command fails then i loose the error message ( and the return
code), but I can read the stdout into perl very easily.

I'm looking for an small elegant solution (as the script is fairly small).
But I will use suggestions involving the redirecting of output to seperate
files if I have to.

Thanks all :)

-----------------------------------------
Craig Moynes
Internship Student
netCC Development
IBM Global Services, Canada
Tel: (905) 316-3486
[EMAIL PROTECTED]


Reply via email to