雖然我嘗試將perl模塊導入到我的腳本中,但它沒有找到perl模塊。找不到Perl模塊
#!/usr/bin/env perl
use lib 'mnt/hgfs/scripting/perl/perlib/Array';
use Shell;
#define all global variables here
use List::MoreUtils 'first_index';
use List::MoreUtils 'last_index';
use Getopt::Long;
use vars qw(%vectorList);
use Array::Compare;
我收到以下錯誤 -
Can't locate Array/Compare.pm in @INC (@INC contains: mnt/hgfs/scripting/perl/perlib/Array /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/5.10.1 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.10 /usr/share/perl/5.10 /usr/local/lib/site_perl .) at wellbiasing.pl line 12.
BEGIN failed--compilation aborted at wellbiasing.pl line 12.
即使我已經安裝在perlib目錄陣列模塊,它說的模塊是不是found.Array是我不得不perlib目錄中的目錄
爲了將所有模塊放在Array目錄中而創建了Compare.pm。但爲什麼我無法運行它?
'mnt /'看起來像一條相對路徑。爲了避免進一步的麻煩,您通常會爲'@ INC'添加完整路徑。 – toolic 2011-12-24 19:48:04