Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: "Exception" handling and more...

by hotshot (Prior)
on Nov 26, 2001 at 14:48 UTC ( [id://127517] : note . print w/replies, xml ) Need Help??


in reply to "Exception" handling and more...

you can catch STDERR from your script or system commands in two ways:
my $errorCode = system(SYSCOMMAND/SCRIPT);
that will give you the error code of the syscommand/script.
my $errorMessage = `SYSCOMMAND/SCRIPT`; # back ticks
will give you the error message maybe checking $! will help you too

goodluck

Hotshot