use CGIでinternal server error

form

<!DOCTYPE html>
<meta charset="utf-8">
<style>
#errorMessage {
	color: red;
}
</style>
<form action="/cgi-bin/test.cgi">
<div id="errorMessage"></div>

<label for="name">お名前:</label>
<input name="name" id="name" required><br>
<label for="password">パスワード:</label>
<input type="password" name="password" id="password" required><br>
<label for="passwordConfirm">パスワード(確認):</label>
<input type="password" name="confirm" id="confirm" oninput="CheckPassword(this)"><br>
<input type="submit" value="送信">
</form>
<script>
		function CheckPassword(confirm){
			var input1 = password.value;
			var input2 = confirm.value;

			if (input1 != input2){
				confirm.setCustomValidity("入力値が一致しません");
			} else{
				confirm.setCustomValidity('');
			}
		}
</script>

データ受け取りのcgi

#!/usr/bin/perl --
use strict;
use utf8;
use warnings;
use CGI;

my $q = new CGI;
my $param1 = $q->param('name');
my $param2 = $q->param('password');

print "Content-type:text/html\n\n";
print "<html>\n";
print "<head></head>\n";
print "<h1>Hello World</h1>";
print "</html>";

view

なんでやねん、て、use CGIをコメントアウトするとinternal server errorが消えているので、おそらくcuse CGIがinstallされていないだけかと。。

[vagrant@localhost ~]$ find `perl -e ‘print “@INC”‘` -name ‘*.pm’ -print | grep CGI