There is a column by merlyn called Capturing those CGI errors as Email which explains one approach.
In reply to Re: Carp: Fatals to my email by skx in thread Carp: Fatals to my email by Andre_br