套件wamp5,自己装的ActivePerl-5.8.8.820 目录如下 D:\wamp D:\wamp\Apache2 D:\wamp\www D:\wamp\php D:\wamp\perl 安装ActivePerl D:\wamp\cgi-bin 放置cgi 测试hello.pl可以 代码: print "Content-type: text/html\n\n"; print "hello world"; 测试test.pl 500错误 代码: ## printenv -- demo CGI program which just prints its environment ## use strict; print "Content-type: text/html\n\n"; print " Environment variables "; foreach (sort keys %ENV) { my $val = $ENV{$_}; $val =~ s|\n|\\n|g; $val =~ s|"|\\"|g; * print "$_ = \"${val}\" \n"; } #sleep(10); print " "; 运行mt里的mt-check.cgi可以的 但运行mt.cgi就500错误 错误日志 代码: [Sun Jul 08 15:25:05 2007] [error] String found where operator expected at D:/wamp/cgi-bin/test.pl line 16, near "* print "$_ = \\"${val}\\"\r\n \\n""\n (Might be a runaway multi-line "" string starting on line 15)\nsyntax error at D:/wamp/cgi-bin/test.pl line 16, near "* print "$_ = \\"${val}\\"\r\n \\n""\n [Sun Jul 08 15:34:59 2007] [error] [client 127.0.0.1] File does not exist: D:/wamp/www/images, referer: http://localhost/perl/mt/mt-check.cgi 附httpd.conf