Question : rendering html via CGI

I'm learning how to write CGI script via perl. I got the script to display on my machine however instead of rendering html it just dumps the text on the browser.
the url i'm hitting is
http://localhost/cgi-bin/test.cgi

and the output to the browser is


hi




Code Snippet:
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
#!c:/Perl/bin/perl.exe
##
##  printenv -- demo CGI program which just prints its environment
##
 
print "Content-type: text/plain; charset=iso-8859-1\n\n";
print <

hi

END_OF_HTML ;
Open in New Window Select All

Answer : rendering html via CGI

print "Content-type: text/html; charset=iso-8859-1\n\n";

Random Solutions  
 
programming4us programming4us