以下のソースをご利用下さい
#!/usr/local/bin/perl
check();
sub check
{
use Config;
print "Content-type: text/html\n\n";
print <<EOM;
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="ja" xml:lang="ja">
<head>
<title>簡易環境チェッカー</title>
<style>
#check {width:500px;margin:30px auto;padding:0px;border:1px solid;}
h1 {padding:5px;border-bottom:1px solid;margin-bottom:30px;}
table {margin:5px auto;border-collapse:collapse;}
th {text-align:left;vertical-align:top;padding-right:1em;border-bottom:1px solid #666;padding-top:0.5em;}
td {border-bottom:1px solid #666;padding-top:0.5em;}
address {font-style:normal;font-size:12px;text-align:right;margin-top:30px;padding:5px;border-top:1px solid;}
a {color:#000;text-decoration:none;}
a:hover {color:#f00;}
</style>
</head>
<body>
<div id="check">
<h1>簡易環境チェッカー</h1>
EOM
print "<div style=\"display:none;\">";
$check = `whereis sendmail`;
$check =~ tr/\x0d\x0a//d;
$check = '不明(管理者にお問い合わせください)' if ($check eq "");
print "</div>";
print <<EOM;
<table>
<tr>
<th><tt>Perlのバージョン</tt></th>
<td><tt>$]</tt></td>
</tr>
EOM
@MODULES = ('Jcode');
foreach $modname(@MODULES){
eval "use $modname;";
print "<th><tt>Jcode module</tt></th><td><tt>";
if($@){ print "インストールされていません"; }else{ print "インストール済"; }
print "\</tt></td></tr>";
}
print <<EOM;
<tr>
<th><tt>sendmailへのパス</tt></th>
<td><tt>$check</tt></td>
</tr>
</table>
<address>
Copyright (c) 2001-2007 <a href="http://magokorokikaku.com/moeya/moeya_top.htm"> 萌屋本舗 / 真心企画</a>
</address>
<div>
</body>
</html>
EOM
exit;
}