use CGI; my $cgi = new CGI; print $cgi->header('text/plain'); print < HELLO HTML! HTML #### Content-Type: text/plain; charset=ISO-8859-1 HELLO HTML!