內的輸出腳本我有一個非常奇怪的問題,但只有在運行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(」 –