1.到search.cpan.org去下载一个Net::Telnet(http://search.cpan.org/CPAN/authors/id/J/JR/JROGERS/Net-Telnet-3.03.tar.gz)
2.
a. Create a makefile by running Makefile.PL using the perl
program into whose library you want to install and then run
make three times:
perl Makefile.PL
make
make test
make install
查看安装路径:
[oracle@dwh1 ~]$ perldoc -l DBI
/usr/local/lib64/perl5/DBI.pm
[root@june2 ~]# perldoc -l Net::Telnet
/usr/lib/perl5/site_perl/5.8.8/Net/Telnet.pm
[root@june2 Net-Telnet-3.03]# perldoc -l Net::Ping
/usr/lib/perl5/5.8.8/Net/Ping.pm
[root@june2 Net-Telnet-3.03]# cat 1.pl
print "@INC
";
[root@june2 Net-Telnet-3.03]# perl 1.pl
/usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.8 /usr/lib/perl5/site_perl/5.8.7 /usr/lib/perl5/site_perl/5.8.6 /usr/lib/perl5/site_perl/5.8.5 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.8/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.7/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.6/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.5/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.8 /usr/lib/perl5/vendor_perl/5.8.7 /usr/lib/perl5/vendor_perl/5.8.6 /usr/lib/perl5/vendor_perl/5.8.5 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.8/i386-linux-thread-multi /usr/lib/perl5/5.8.8 .
保存在"@INC"中