内的输出脚本我有一个非常奇怪的问题,但只有在运行Ubuntu时(在CentOS evertyhing正在运行)。 我在Perl中创建了一个脚本,并使用了Mail::IMAPClient模块。Perl PP正在搜索/ script/
当我运行下面的命令:
pp -o myapp perlscript.pl
一切工作,但是当我试图执行二进制脚本(MYAPP),它给了我下面的错误:
Cannot connect through IMAPClient: No such file or directory at script/perlscript.pl line 22.
但是当我运行perlscript.pl时一切正常......
你知道为什么吗?
脚本:
#!/usr/bin/perl
use strict;
use Mail::IMAPClient;
use Data::Dumper;
use MIME::QuotedPrint();
$|=1;
# Vars
my $odate = `date +'%d/%m/%Y'`; chomp($odate);
$odate = '15/01/2012';
my $timeout = 120;
# Connect to IMAP server
my $imap = Mail::IMAPClient->new(
Server => 'imap.gmail.com',
User => '[email protected]',
Password => 'my_password',
Port => 993,
Ssl => 1,
)
or die "Cannot connect through IMAPClient: $!";
你忽视提供必要的信息,以便我们[重现问题](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html#showmehow)。粘贴你的程序将是一个好的开始,所以你可以看到第22行的错误消息是什么,直到那时,只有猜测是可能的。 – daxim
编辑页面....第22行是“my $ imap = Mail :: IMAPClient-> new(” –