#!/usr/bin/perl $DEBUG = 0; ######## use CGI; $query = new CGI; ######## $type = 'something/else'; print $query->header(); $ERROR = $query->cgi_error; $fh = $query->upload('$filename'); $filename = escapeHTML($query->param('attfile')); $type = $query->uploadInfo($filename)->{'Content-Type'}; unless ($type eq 'text/html') { die "HTML FILES ONLY!"; } if (!$fh) { print_html($ERROR); exit 0; } else { print_html("The file was of type ", $type); } if($DEBUG == 1) { @Everything = <$fh>; print_html(@Everything); } sub print_html { @String_To_Use = @_; $SizeOfArray = $#_; $Count = 0; print $query->start_html(); print "