一行表示するCGI
#! /usr/local/bin/perl
# first sample print<<HT_ML; Content-type: text/html\n\n <html> <head> <title>sample1</title> </head> <body> <h1>hello</h1> </body> </html> HT_ML
C:\perl hello.cgiで実行し、動作を確認します。以下のような表示が出ます。
C:\Lang\Perl\cgi>perl hello.cgi Content-type: text/html <html> <head> <title>sample1</title> </head> <body> <h2>hello</h2> </body> </html>