{"id":117437,"date":"2018-09-04T08:06:35","date_gmt":"2018-09-04T00:06:35","guid":{"rendered":"https:\/\/lrxjmw.cn\/?p=117437"},"modified":"2018-08-27T11:07:55","modified_gmt":"2018-08-27T03:07:55","slug":"perl-programming-skills","status":"publish","type":"post","link":"https:\/\/lrxjmw.cn\/perl-programming-skills.html","title":{"rendered":"\u5927\u795e\u6559\u4f60\uff1aPerl \u7f16\u7a0b\u6280\u5de7"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | Perl \u8d77\u521d\u662f\u7531 Larry Wall \u4e3a\u4e86\u8ba9\u5728 UNIX \u4e0a\u8fdb\u884c\u62a5\u8868\u5904\u7406\u7684\u5de5\u4f5c\u53d8\u5f97\u66f4\u52a0\u65b9\u4fbf\u800c\u8bbe\u8ba1\u548c\u5f00\u53d1\u7684\u5b9e\u7528\u6458\u5f55\u548c\u62a5\u544a\u8bed\u8a00\uff08Practical Extraction and Report Language\uff09\uff0c\u5b83\u501f\u9274\u4e86 C\u3001awk\u3001shell \u811a\u672c\u4ee5\u53ca\u5f88\u591a\u5176\u5b83\u7f16\u7a0b\u8bed\u8a00\u7684\u7279\u6027\u3002Larry Wall \u672c\u4eba\u4e5f\u662f\u4e00\u4e2a\u8bed\u8a00\u5b66\u5bb6\uff0c\u4ed6\u8bbe\u8ba1 perl \u8bed\u8a00\u65f6\u4f7f\u7528\u4e86\u5f88\u591a\u8bed\u8a00\u5b66\u7684\u601d\u7ef4\uff0c\u4ed6\u4e5f\u7ecf\u5e38\u4f7f\u7528\u8bed\u8a00\u5b66\u8bf4\u660e perl \u8bed\u8a00\u7684\u67b6\u6784\uff0c\u50cf\u201c\u53d8\u91cf\u201d\u548c\u201c\u51fd\u6570\u201d\uff0c\u4ed6\u6709\u65f6\u8bf4\u6210\u201c\u540d\u8bcd\u201d\u548c\u201c\u52a8\u8bcd\u201d\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \u5229\u7528\u6ce8\u91ca\u8c03\u8bd5\uff1a\u4f7f\u7528 Smart::Comments \u6a21\u5757<\/strong><\/span><\/div>\n \u8c03\u8bd5 Perl \u811a\u672c\u6709\u4e24\u79cd\u65b9\u5f0f\uff1a\u4e00\u79cd\u662f\u4f7f\u7528 Perl \u7684\u5185\u7f6e\u8c03\u8bd5\u5668\uff0c\u53e6\u4e00\u79cd\u662f\u5728\u811a\u672c\u4e2d\u5d4c\u5165 print \u8bed\u53e5\u3002\u5982\u679c\u662f\u7b2c\u4e8c\u79cd\uff0c\u5927\u6982\u5c31\u4f1a\u4e86\u89e3\u5230\uff0c\u50cf\u90a3\u6837\u624b\u5de5\u8c03\u8bd5\u7684\u6700\u5927\u95ee\u9898\u662f\uff1a\u4e00\u65e6\u79fb\u9664\u4e86 bug\uff0c\u5c31\u5f97\u4e5f\u540c\u65f6\u901a\u7bc7\u79fb\u9664\u8c03\u8bd5\u8bed\u53e5\u3002\u4f46\u662f\u5982\u679c\u80fd\u5c06\u8fd9\u4e9b\u8bed\u53e5\u5b89\u5168\u5730\u7559\u5728\u4ee3\u7801\u91cc\u4e0d\u662f\u66f4\u597d\u5417\uff1f\u6bd5\u7adf\u5f88\u53ef\u80fd\u518d\u6b64\u9700\u8981\u4ed6\u4eec\uff0c\u7279\u522b\u662f\u5f53\u53c8\u6709 bug \u51fa\u73b0\u7684\u65f6\u5019\u3002<\/p>\n \u73b0\u5728\uff0c\u5728 Perl \u91cc\u6709\u8fd9\u6837\u4e00\u4e2a\u6a21\u5757\uff1a\u5b83\u53ef\u4ee5\u5229\u7528\u6ce8\u91ca\u6765\u5f00\u542f\u8c03\u8bd5\u8bed\u53e5\uff0c\u8fd9\u5c31\u662f Smart::Comments \u6a21\u5757\u3002\u4e0b\u9762\u662f\u6700\u7b80\u5355\u7684\u793a\u4f8b\uff0c\u5f53\u4f7f\u7528 Smart::Comments \u65f6\uff0c\u4efb\u4f55\u7531\u4e09\u4e2a\u6216\u66f4\u591a\u4e2a # \u5f00\u5934\u7684\u6ce8\u91ca\u5c31\u4f1a\u53d8\u6210\u8c03\u8bd5\u8bed\u53e5\uff0c\u5e76\u4f1a\u628a\u6ce8\u91ca\u7684\u6240\u6709\u5185\u5bb9\u9001\u5230\u5c4f\u5e55\uff1a<\/p>\n \r\n#!\/usr\/bin\/perl\r\nuse Smart::Comments;\r\n\r\nmy @ipaddr = split \/\\.\/, \"10.109.32.151\";\r\n\r\n### @ipaddr;\r\n<\/pre>\n |