in reply to Debugging CGI/PERL
I like to use CGI::Debug for my CGI debugging...
It can log error, or even mail them to you (useful for when your CGI's hit production).