BEGIN { use CGI::Carp qw(carpout fatalsToBrowser); open (LOG, ">errorlog.txt") or die("Unable to open errorlog.txt: $!\n"); carpout(LOG); }