BEGIN { use CGI::Carp qw(carpout fatalsToBrowser); open (LOG, ">errorlog.txt") or die("Unable to open errorlog.txt: $!\n"); carpout(LOG); } #### BEGIN not safe after errors--compilation aborted at /site_path/cgi-bin/event/eventform.cgi line 12.