One of the things that I have is a step to capture the actual error messages that might go to STDERR. I try to capture all the output of a program into a logfile. I use an END block to determine whether the program exits cleanly or if its generated an error. Different exits determine differnt behaviors. For instance, when the program dies, it sends out an alert to a pager and makes a copy of the log so that I (or someone else) can look at the errored log and see what blew up (in case the actual log gets overwritten before we can get dialed in). You might look at using $SIG {__DIE__}. Just my own 2 cents though :-)
"Ex libris un peut de tout"