BEGIN { if ($@) { # This print html error code will go into a sub within # the main script. It's here for illustration purposes. print qqContent-type: text/html\n\n~; print qq~\n~; print qq~\n~; print qq~Error\n~; print qq~\n~; print qq~\n~; print qq~A fatal error has occurred blah blah...\n~; print qq~\n~; print qq~~; exit; } }