我写了个perl测试程序,放在宏网上为什么不能执行?(注:本地已调通)
元明 2001-03-21 02:06:00 附源程序:
-----------------------------------------
#common.pl
#header
sub COMMON_Header
{
print "Content-type: text/plain", "\n\n";
print "<html>", "\n\n";
print "<head>", "\n\n";
print "<title>", "@_", "</title>", "\n\n";
print "</head>", "\n\n";
} #end COMMON_Header
#footer
sub COMMON_Footer
{
print "<hr>", "\n\n";
print "<center><font color=\"\#339900\"><b><i><font size=\"2\">I.C.E.Soft Studio Copyright(C)1999~2001
All Rights Reserved</font></i></b></font></center>", "\n\n";
print "</body>", "\n\n";
print "</html>", "\n\n";
} #end COMMON_Footer
1;
#end common.pl
--------------------------------------------
#!usr/bin/perl5(这里是我按照宏网的例子设的路径)
#testserver.pl
require "lib/common.pl";
#定义列表变量
%EnvVarList =
(
'AUTH_TYPE', 'Server\'s authentication method is: ',
'CONTENT_LENGTH', 'Length of any attached information: ',
'CONTENT_TYPE', 'Type of any attached information: ',
'GATEWAY_INTERFACE', 'CGI version on server is: ',
'HTTP_ACCEPT', 'Client will accept these MIME types: ',
'HTTP_REFERER', 'Referrer\'s URL is: ',
'HTTP_USER_AGENT', 'Client\'s browser is: ',
'PATH_INFO', 'Extra PATH information is: ',
'PATH_TRANSLATED', 'PATH translation is: ',
'QUERY_STRING', 'Query string sent by client is: ',
'REMOTE_ADDR', 'Client\'s IP address is: ',
'REMOTE_HOST', 'Client\'s domain name is: ',
'REMOTE_IDENT', 'Identity data sent by client is: ',
'REMOTE_USER', 'User ID sent by client is: ',
'REQUEST_METHOD', 'Client\'s request method is: ',
'SCRIPT_NAME', 'URL of the CGI application is: ',
'SERVER_NAME', 'Server\'s computer name is: ',
'SERVER_PORT', 'Connection made at this port: ',
'SERVER_PROTOCOL', 'Server is using this protocol: ',
'SERVER_SOFTWARE', 'Server is running this software: '
);
&COMMON_Header("测试服务器");
print "<body>", "\n\n";
print "<center>测试服务器</center>", "\n\n";
print "<hr>", "\n\n";
while(($EnvironmentVar, $Desc) = each(%EnvVarList))
{
print $EnvironmentVar, ":", $Desc, $ENV{$EnvironmentVar},
"<br>", "\n";
}
&COMMON_Footer;
# end testserver.pl
--------------------------------------------------
各位高手请帮忙!