Printing Html in CGI

by on October 10th, 2007

Examples of printing HTML in CGI scripts.

Simple html output from cgi script
#!/usr/bin/perl -wt
print "Content-type: text/html\n\n";
print "Hello World\n";
print "\n";
print "

Hello, world!

\n"; print "\n";
HTML in CGI Second Example
#!/usr/bin/perl -wt
print "Content-type: text/html\n\n";
print <Test Page

Hello, world! This is cgi and html printing

EndOfHTML print end_html;
Download Script

Download Example