Perl

  1. use CGI について
  2. サンプルプログラム http://nlp.kimura-s.otaru-uc.ac.jp/Perl/sample2.cgi
    	#!/usr/bin/perl
    	use CGI;
    	my $charset="utf-8";
    	my $title="小樽商科大学";
    	my $myself = './sample2.cgi';
    	my $q = new CGI;
    	print $q->header(-charset=>$charset);
    	print $q->start_html(-title=>$title, -encoding=>$charset);
    	print "入力:" . $q->param('user') . "<br>\n";
    	my @time = localtime(time);
    	$time[4]++;
    	$time[5] += 1900;
    	foreach(@time){ print "$_/";}
    	print "<br>$time[5]月$time[4]月$time[3]日<br>\n";
    	print $q->start_form(-method => 'POST', -action => $myself);
    	print qq|<input type="text" size="30" name="user" value="">\n|;
    	print qq|<input type="submit" name="submit" value="送信">\n|;
    	print $q->end_form();
    	print $q->end_html();