The CGI::Carp idea is good. If you don't want to output errors to your web pages, just use Carp; (croak ~ die, carp ~ warn ) to get stacktraces output to the error logs.
Also, the error logs may be in a few places, depending on the system you're working on. Look in /etc/httpd/logs/ or /var/log/httpd. If you think there's something more going on, try:
%> cat /etc/httpd/conf*/*.conf | grep -i Log
You'll get a list of all the mentions of logging in the conf and conf.d files.
Also, when you check code with perl -c, put in all the options you would normally put on the #! line. For example, you may want to use:
%> perl -cwT some.cgi
And lastly, use __FILE__ and __LINE__ if you're having trouble inside of if statements. These always work (in my experience... nothing really -always- works).
if( 1 ){
&foo || die "$! at " . __FILE__ . "-" . __LINE__ ;
}
I hope this helps. Good luck!