Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: "Exception" handling and more...

by rob_au (Abbot)
on Nov 26, 2001 at 14:44 UTC ( [id://127515] : note . print w/replies, xml ) Need Help??


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

With regards to STDERR trapping, I would direct you to the node How can I capture STDERR from an external command? or Capture Error Messages to a File? How? or even how do i redirect STDOUT, STDIN, or STDERR to a FILE? - All found through the beast that is Super Search.

With error handling, I think your best option may be to execute your perl code within a eval statement and examine the value of $@ upon exit from the scope. I would suggest you to have a read through "Error Indicators", also on the perlvar page (right down the bottom).

 

Ooohhh, Rob no beer function well without!