0
任何人都可以告诉我如何在服务器上运行Perl脚本。 我用FTP上传了它。通过在cgi-bin文件夹中添加.pl
文件,脚本不起作用。我也试着用cPanel上传它。如何在cPanel运行的linux服务器上运行perl脚本?
BEGIN {
my $base_module_dir = (-d '/home/username/perl' ?
'/home/username/perl' : (getpwuid($>)
)[7] . '/perl/');
unshift @INC, map { $base_module_dir . $_ } @INC; }
对于最后一个选项,我甚至想在脚本的开头添加
#!/usr/bin/perl
。
我还能尝试什么?
尝试运行脚本时看到了哪些错误? – Shalini 2011-03-28 17:52:13
cPanel是一个红鲱鱼。按照[经典CGI故障排除指示](http://stackoverflow.com/questions/2165022/how-can-i-troubleshoot-my-perl-cgi-script)。 – daxim 2011-03-28 17:57:31
@shalini错误500 – JustCoding 2011-03-29 04:52:40