I'm bound to get flamed for this, but I get frustrated by folks who want to "help" by simply responding with
use strict!, without bothering to explain why this is relevant . I'm under the impression that a number of Monks have been brainwashed into using it without really understanding what it does in particular situations (refs/vars/subs).
Dominus wrote a rather good column,
Use Strict warnings and diagnostics or die that helps to clear up the fog on this topic.
Rather, I suggest you make sure to utilize the CGI::Carp module when developing any perl CGI. However, I also suggest that you only use fatalsToBrowser (in its default form) during development and testing... if you must leave it in there, please consider customizing the errors. Leaving the vanilla responses in there can provide more information to guests than you want to let loose.
use CGI::Carp qw(fatalsToBrowser);
When this routine is imported via use, fatal errors, such as those produced by die and confess, send error messages to the browser as well as the error log. A simple HTTP response is created with the error message, followed by a request to send mail to the web administrator.**
-fp
** Perl In a Nutshell, Chapter 8, O'Reilly Publishers
Update: Note about fatalsToBrowser customization.