use strict; use warnings; use CGI::Pretty; use CGI::Carp qw( fatalsToBrowser ); BEGIN { # sub carp_error { # my $error_message = shift; # my $cq = new CGI; # print $cq->start_html( "Error" ), # $cq->h1("Error"), # $cq->p( "Sorry, the following error has occurred: " ), # $cq->p( $cq->i( $error_message ) ), # $cq->end_html; # } CGI::Carp::set_message( \&carp_error ); } die $!; #### Content-type: text/html Undefined subroutine &main::carp_error called at C:/Perl/lib/CGI/Carp.pm line 45 6.