Perl

	!/usr/bin/perl
	use CGI;
	my $charset="utf-8";
	my $title="Mecab";
	my $myself = './****.cgi';#<----修正
	my $q = new CGI;
	print $q->header(-charset=>$charset);
	print $q->start_html(-title=>$title, -encoding=>$charset);
	print $q->Link({-rel=>'stylesheet',-href=>'sample.css'});
	print $q->h3("Mecab で形態素解析をしてみる");
	if($q->param('text')){
		open(OUT,">abc");#適当なファイル名「chmod 666」 しておく
		print OUT $q->param('text');
		close(OUT);
		$Mecab = `/usr/local/bin/mecab -O wordspos tmp`;#wordspos 木村の設定
		print $q->h3("Mecab実行結果 \"単語:品詞 \"");
		print $q->h4("入力文");
		print $q->param('text') . "<br>\n";
		print $q->h4("実行結果");
		print $Mecab;
		
	}
	my @time = localtime(time);
	$time[4]++;
	$time[5] += 1900;
	#foreach(@time){ print "$_/";}
	print $q->h3("文を入力して下さい。");
	print "<br>$time[5]月$time[4]月$time[3]日<br>\n";
	print $q->start_form(-method => 'POST', -action => $myself);
	print qq|<TEXTAREA name="text" cols="60" rows="6" wrap="off"></TEXTAREA><br>\n|;
	print qq|<input type="submit" name="submit" value="送信">\n|;
	print $q->end_form();
	print $q->h3("<a href=\"http://nlp.kimura-s.otaru-uc.ac.jp\">小樽商科大学 木村研究トップへ</a>");
	print $q->end_html();