#! /usr/bin/perl use strict; use CGI; my $PASS = 'CJB'; # コアラ、トラ、カメ my $cgi = new CGI; my $inputPass = $cgi->param('password'); print $cgi->header( -type => 'text/html', -charset => 'UTF-8' ); print $cgi->start_html(-lang=> 'ja', -title=>$ENV{SCRIPT_NAME}, -encoding=>'UTF-8'); if($inputPass eq $PASS) { print "正しいパスワードです。"; } else { print "パスワードが間違っています。"; } print $cgi->end_html();