#!/usr/bin/perl -w use strict; use CGI qw/ :all /; $SIG{__DIE__} = \&htmldie; open FIN,"< some_stupid_nonexistant_file.or.other" or die $!; my $line=; exit(0); sub htmldie { my @args=@_; print header,start_html,pre(join("\n",@args)),end_html; exit(0); }