read.cgi改良スレッド

このエントリーをはてなブックマークに追加
345音楽侍 ◆NtVkSITE
sub time2lastmod{
my($time) = shift;
my($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst)
= gmtime($time);
$wday = qw(Sun Mon Tue Wed Thu Fri Sat)[$wday];
$mon = qw(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)[$mon];
sprintf("%s, %02d %s %d %02d:%02d:%02d GMT",
$wday, $mday, $mon, $year+1900, $hour, $min, $sec);
}
ここでエラー出ます。
Can't use subscript on split at test.cgi line 77, near "$wday]"
Can't use subscript on split at test.cgi line 78, near "$mon]"
Execution of test.cgi aborted due to compilation errors.