@INC
indou@T21:Expect-1.21$ perl -le "print for @INC"
/etc/perl
/usr/local/lib/perl/5.8.8
/usr/local/share/perl/5.8.8
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.8
/usr/share/perl/5.8
/usr/local/lib/site_perl
.
indou@T21:Expect-1.21$
追加するには
unshift @INC, '/home/user/lib/';
環境変数に
% setenv PERL5LIB=/home/user/lib
% perl -le 'print for @INC'
/home/user/lib
/etc/perl
/usr/local/lib/perl/5.8.8
/usr/local/share/perl/5.8.8
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.8
/usr/share/perl/5.8
/usr/local/lib/site_perl
または
BEGIN {
push(@INC, '/usr/local/sbin');
}
use libにて追加
use lib 'path to module';