note
Hero Zzyzzx
<p>Or, since you're using [cpan://CGI|CGI.pm] already to parse your form variables (of course you are, right!?), you can just use its escapeHTML function, too:</p>
<code>
use CGI;
my $q=CGI->new();
$file_loc="$sorc";
$whattoread = fopen($file_loc, "r");
$file_contents=fread($whattoread, filesize($file_loc));
fclose($whattoread);
print $q->header();
print $q->pre($q->escapeHTML($file_contents));
</code>
<p>which allows you to display your HTML very reliably, without IE idiotically second-guessing your mime-types. Plus, you can wrap this in whatever real HTML you like.</p>
<p>HTH</p>
<p align=right><font size=1 face="Verdana, San Serif"><b> -Any sufficiently advanced technology is<br> indistinguishable from doubletalk.</b></font></p>
141173
141173