{"id":2114,"date":"2015-04-28T22:33:13","date_gmt":"2015-04-28T14:33:13","guid":{"rendered":"http:\/\/ixyzero.com\/blog\/?p=2114"},"modified":"2015-04-28T22:33:13","modified_gmt":"2015-04-28T14:33:13","slug":"perl%e7%9a%84%e4%b8%80%e4%ba%9b%e5%b0%8f%e7%9f%a5%e8%af%86%e7%82%b9","status":"publish","type":"post","link":"https:\/\/ixyzero.com\/blog\/archives\/2114.html","title":{"rendered":"Perl\u7684\u4e00\u4e9b\u5c0f\u77e5\u8bc6\u70b9"},"content":{"rendered":"<p>\u4e4b\u524d\u66fe\u7b80\u5355\u7684\u5199\/\u6539\u5199\u8fc7\u51e0\u4e2aPerl\u811a\u672c\uff0c\u73b0\u5728\u53c8\u78b0\u5230\u4e00\u4e2aPerl\u5199\u7684\u811a\u672c\uff0c\u4e8e\u662f\u5148\u5feb\u901f\u5b66\u4e60\u4e00\u4e0b Perl\u7684\u76f8\u5173\u77e5\u8bc6\u3002<\/p>\n<h6>\u641c\u7d22\u5173\u952e\u5b57\uff1a<\/h6>\n<ul>\n<li>perl \u5feb\u901f \u5b66\u4e60<\/li>\n<li>perl \u6559\u7a0b<\/li>\n<li>perl tutorial<\/li>\n<li>Perl \u6253\u5370\u5b57\u7b26\u4e32<\/li>\n<li>Perl \u6ce8\u91ca<\/li>\n<li>Can&#8217;t locate Net\/LDAP.pm in @INC #AOL&amp;Baidu\u641c\u7d22<\/li>\n<\/ul>\n<h5>\u5728Linux\u4e0b\u5982\u4f55\u5b89\u88c5\u5728Perl\u811a\u672c\u91cc\u7528\u5230\u7684\u6a21\u5757\uff1f<\/h5>\n<blockquote><p>Can&#8217;t locate Net\/LDAP.pm in @INC (@INC contains: \/usr\/local\/lib64\/perl5 \/usr\/local\/share\/perl5 \/usr\/lib64\/perl5\/vendor_perl \/usr\/share\/perl5\/vendor_perl \/usr\/lib64\/perl5 \/usr\/share\/perl5 .) at .\/xxx.pl line 40.<br \/>\nBEGIN failed&#8211;compilation aborted at .\/xxx.pl line 40.<\/p><\/blockquote>\n<h6>\u65b9\u6cd5\u4e00\uff1a\u76f4\u63a5yum search\/install\u8bd5\u8bd5<\/h6>\n<pre class=\"lang:default decode:true \">$ perl -MCPAN -e shell\nCan't locate CPAN.pm in @INC (@INC contains: \/usr\/local\/lib64\/perl5 \/usr\/local\/share\/perl5 \/usr\/lib64\/perl5\/vendor_perl \/usr\/share\/perl5\/vendor_perl \/usr\/lib64\/perl5 \/usr\/share\/perl5 .).\nBEGIN failed--compilation aborted.\n\n$ sudo yum search perl-CPAN\nLoaded plugins: fastestmirror\nLoading mirror speeds from cached hostfile\n============================================= N\/S Matched: perl-CPAN ==============================================\nperl-CPAN.x86_64 : Query, download and build perl modules from CPAN sites\nperl-CPANPLUS.x86_64 : API &amp; CLI access to the CPAN mirrors\n\n  Name and summary matches only, use \"search all\" for everything.\n$ sudo yum search perl-LDAP\nLoaded plugins: fastestmirror\nLoading mirror speeds from cached hostfile\n============================================= N\/S Matched: perl-LDAP ==============================================\nperl-LDAP.noarch : LDAP Perl module\n\n  Name and summary matches only, use \"search all\" for everything.<\/pre>\n<h6>\u65b9\u6cd5\u4e8c\uff1aCPAN\u6216\u6e90\u7801\u7f16\u8bd1\u5b89\u88c5<\/h6>\n<p>The scripts outputs &#8220;Can&#8217;t locate Net\/SNMP.pm in @INC&#8230;..&#8221;<br \/>\nYou don&#8217;t have Net::SNMP installed, see below<br \/>\nHow do I install Net::SNMP perl module ?<br \/>\nThere are 2 ways of doing this<\/p>\n<p><strong>1) By CPAN (<span style=\"color: #ff0000;\">best<\/span>)<\/strong><\/p>\n<p>on command line, as root :<\/p>\n<pre class=\"lang:default decode:true\">[your_host]# perl -MCPAN -e shell\ncpan shell -&gt; CPAN exploration and modules installation (v1.76)\nReadLine support enabled\ncpan&gt; install Net::SNMP\nIf it's the first time you run CPAN, it will probably ask you some (simple) questions.\nCPAN will also ask you to satisfy some dependencies (Crypt::DES, Digest::MD5, etc..).<\/pre>\n<p><strong>2) &#8220;By hand&#8221;<\/strong><\/p>\n<p>Get the folowings modules (tar.gz format) on <a href=\"http:\/\/www.cpan.org\" target=\"_blank\">www.cpan.org<\/a><br \/>\n&#8211; Crypt::DES<br \/>\n&#8211; Digest::MD5<br \/>\n&#8211; Digest::SHA1<br \/>\n&#8211; Digest::HMAC<br \/>\n&#8211; Net::SNMP<\/p>\n<p>for each one (you must install Net::SNMP at the end) :<\/p>\n<pre class=\"lang:default decode:true \">tar zxf &lt;module&gt;.tar.gz\ncd &lt;module&gt;\nperl Makefile.pl\nmake test\nmake install<\/pre>\n<p>&nbsp;<\/p>\n<h6>\u53c2\u8003\u94fe\u63a5\uff1a<\/h6>\n<ul>\n<li><a href=\"http:\/\/man.ddvip.com\/web\/perl\/index.htm\" target=\"_blank\">Perl\u4e2d\u6587\u624b\u518c<\/a>\u00a0#Nice<\/li>\n<li><a href=\"http:\/\/sebug.net\/paper\/books\/perl\/flamephoenix\/index.htm\" target=\"_blank\">Perl\u6559\u7a0b<\/a><\/li>\n<li><a href=\"http:\/\/jianlee.ylinux.org\/Computer\/Perl\/perl_base.html\" target=\"_blank\">Perl \u57fa\u672c\u8bed\u6cd5<\/a>\u00a0#Nice<\/li>\n<li><a href=\"http:\/\/qntm.org\/files\/perl\/perl_cn.html\" target=\"_blank\">\u4e24\u4e2a\u534a\u5c0f\u65f6\u5b66\u4f1aPerl<\/a>\u00a0#Nice<\/li>\n<li>=<\/li>\n<li><a href=\"http:\/\/perl-tutorial.org\/\" target=\"_blank\">Perl Tutorial Hub<\/a><\/li>\n<li><a href=\"http:\/\/www.oschina.net\/translate\/10-minutes-perl-tutorial-for-java-developer\">\u4e3a Java \u7a0b\u5e8f\u5458\u51c6\u5907\u7684 10 \u5206\u949f Perl \u6559\u7a0b<\/a><\/li>\n<li><a href=\"http:\/\/kodango.com\/learn-perl-notes-1\" target=\"_blank\">\u5b66\u4e60Perl\u7b14\u8bb0\uff08\u4e00\uff09<\/a><\/li>\n<li><a href=\"http:\/\/github.tiankonguse.com\/blog\/2015\/03\/05\/perl-base-study\/\" target=\"_blank\">perl \u5feb\u901f\u5b66\u4e60\u8bb0\u5f55<\/a>\u00a0#Nice<\/li>\n<li>=<\/li>\n<li><a href=\"https:\/\/www.cs.tut.fi\/~jkorpela\/perl\/regexp.html\" target=\"_blank\">Regular expressions in Perl<\/a>\u00a0#Nice<\/li>\n<li><a href=\"http:\/\/perldoc.perl.org\/perlre.html\" target=\"_blank\">perlre &#8211; perldoc.perl.org<\/a><\/li>\n<li><a href=\"http:\/\/perl101.org\/regexes.html\" target=\"_blank\">Perl 101 &#8211; Regexes<\/a><\/li>\n<li><a href=\"http:\/\/www.comp.leeds.ac.uk\/Perl\/matching.html\" target=\"_blank\">Perl tutorial: String matching<\/a><\/li>\n<li>=<\/li>\n<li><a href=\"http:\/\/stackoverflow.com\/questions\/161872\/hidden-features-of-perl\" target=\"_blank\">http:\/\/stackoverflow.com\/questions\/161872\/hidden-features-of-perl<\/a>\u00a0#Nice<\/li>\n<li>=<\/li>\n<li><a href=\"http:\/\/cn.perlmaven.com\/quoted-interpolated-and-escaped-strings-in-perl\">http:\/\/cn.perlmaven.com\/quoted-interpolated-and-escaped-strings-in-perl<\/a><\/li>\n<li>=<\/li>\n<li><a href=\"http:\/\/www.cnblogs.com\/xianghang123\/archive\/2011\/07\/07\/2099898.html\">http:\/\/www.cnblogs.com\/xianghang123\/archive\/2011\/07\/07\/2099898.html<\/a><\/li>\n<li><a href=\"http:\/\/azaleasays.com\/2008\/05\/27\/perl-multi-line-comments\/\">http:\/\/azaleasays.com\/2008\/05\/27\/perl-multi-line-comments\/<\/a><\/li>\n<li>=<\/li>\n<li><a href=\"http:\/\/www.itbulu.com\/perl-time-hires.html\">http:\/\/www.itbulu.com\/perl-time-hires.html<\/a>\u00a0#\u76f4\u63a5yum\u5b89\u88c5<\/li>\n<li><a href=\"http:\/\/blog.chinaunix.net\/uid-8116903-id-334694.html\">http:\/\/blog.chinaunix.net\/uid-8116903-id-334694.html<\/a><\/li>\n<li><a href=\"http:\/\/nagios.manubulon.com\/faq.html\">http:\/\/nagios.manubulon.com\/faq.html <\/a>\u00a0#\u63a8\u8350\uff01<\/li>\n<li>=<\/li>\n<li><a href=\"https:\/\/github.com\/GDSSecurity\/PadBuster\" target=\"_blank\">https:\/\/github.com\/GDSSecurity\/PadBuster<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u4e4b\u524d\u66fe\u7b80\u5355\u7684\u5199\/\u6539\u5199\u8fc7\u51e0\u4e2aPerl\u811a\u672c\uff0c\u73b0\u5728\u53c8\u78b0\u5230\u4e00\u4e2aPerl\u5199\u7684\u811a\u672c\uff0c\u4e8e\u662f\u5148\u5feb\u901f\u5b66\u4e60\u4e00\u4e0b Perl\u7684\u76f8\u5173\u77e5\u8bc6 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[23,11,7,12],"tags":[85,496],"class_list":["post-2114","post","type-post","status-publish","format-standard","hentry","category-knowledgebase-2","category-linux","category-programing","category-tools","tag-perl","tag-tutorial"],"views":2641,"_links":{"self":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/2114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/comments?post=2114"}],"version-history":[{"count":0,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/posts\/2114\/revisions"}],"wp:attachment":[{"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/media?parent=2114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/categories?post=2114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ixyzero.com\/blog\/wp-json\/wp\/v2\/tags?post=2114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}