Print the magic HTTP header Content-type: text/html\n\n, and then the HTML code for the page.
Code:
#!/usr/bin/perl # file: chaucer.pl print "Content-type: text/html\n\n"; print "<html><head><title>Chaucer</title></head><body>\n"; print "<h1>Chaucer Sez</h1>\n"; print "When that Aprill with his shoures soote<br>\n"; print "The droghte of March hath perced to the roote,<br>\n"; print "And bathed every veyne in swich licour<br>\n"; print "Of which vertu engendered is the flour...<p>\n"; print "<cite>-Geoffrey Chaucer</cite>\n"; print "<hr>\n"; print "</body></html>\n"; |
http://your.site/cgi-bin/chaucer.pl
|
| Contents |
Next |