Diagnosing problems with scripts
Adding the line:
use CGI::Carp 'fatalsToBrowser';
line in your script will cause most errors (apart from some script syntax errors) to be displayed on the browser rather than just causing a 500 error
This makes diagnosing script errors much easier. Any calls to
will be displayed on the browser.
You should not leave this in the script once it has been debugged.