【发布时间】:2011-11-20 18:56:42
【问题描述】:
我是这个 perl 脚本的新手,当我尝试查看网页时出现以下错误。 请让我知道这可能是什么原因。
我尝试了以下方法,但没有成功
- 使用PERL5LIB设置环境变量路径
- 将 Session.pm 复制到另一个位置
- 授予所有文件和目录的完全权限
错误:
[错误] [客户端 192.168.0.12] 在 @INC 中找不到 CGI/Session.pm (@INC 包含:.)在 /var/www/cgi-bin/CP/vacation.pl 第 7 行,[错误] [client 192.168.0.12] BEGIN failed - 编译在 /var/www/cgi-bin/CP/vacation.pl 第 7 行,[错误] [客户端 192.168.0.12] 脚本头过早结束:vacation.pl,
显示错误的代码部分用粗体标记:
#!/usr/bin/perl -w
##use strict;
# Exports
use CGI qw/:standard/;
***use CGI::Session;***
use CGI::Carp qw(fatalsToBrowser); ## NOTE: For development purposes.. remove it when deploying
use Sys::Hostname;
use Getopt::Long;
use Time::Local;
require "ebackup.pl" ;
# Global variables
my $send_mail_perl = "/ERecaller/Temp/swaks.pl";
## Server Settings File
my $ipconfig = "/ERecaller/ConfigurationDB/Data/ercl_config_server.txt";
【问题讨论】:
-
你的错误真的是说
(@INC contains: .)吗???那里应该至少有两条其他路径。你的 Perl 出了点问题!
标签: perl