use CGI qw(:standard); # you already have this use CGI::Carp; use CGI::Carp qw(fatalsToBrowser); local $SIG{__WARN__} = \&Carp::cluck;