{"id":431,"date":"2012-07-03T22:43:23","date_gmt":"2012-07-03T13:43:23","guid":{"rendered":"http:\/\/ts-engine.net\/wp\/?p=431"},"modified":"2012-07-03T22:43:23","modified_gmt":"2012-07-03T13:43:23","slug":"%e3%82%b3%e3%83%a1%e3%83%b3%e3%83%88%e3%82%a2%e3%82%a6%e3%83%88%e3%81%aa%e3%81%97%e3%81%a7%e3%83%95%e3%82%a1%e3%82%a4%e3%83%ab%e3%82%92%e3%81%bf%e3%82%8b%e3%81%9f%e3%82%81%e3%81%aeperl%e3%82%b9","status":"publish","type":"post","link":"http:\/\/ts-engine.net\/?p=431","title":{"rendered":"\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u306a\u3057\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u307f\u308b\u305f\u3081\u306eperl\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u3063\u305f\u3002"},"content":{"rendered":"<p>\u6700\u8fd1\u3001\u30a4\u30f3\u30d5\u30e9\u30a8\u30f3\u30b8\u30cb\u30a2\u3082\u304c\u3093\u304c\u3093\u30b3\u30fc\u30c9\u3092\u66f8\u304b\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u304b\u3093\u3058\u306a\u306e\u3067\u3001perl\u3092\u52c9\u5f37\u3057\u3066\u3044\u308b\u3002<br \/>\n\u4e0a\u9054\u3059\u308b\u306b\u306f\u3001\u3084\u3063\u3071\u308a\u30b3\u30fc\u30c9\u3092\u304c\u3057\u304c\u3057\u66f8\u304f\u306e\u304c\u4e00\u756a\uff01\u3068\u3044\u3046\u30a2\u30c9\u30d0\u30a4\u30b9\u3092\u3082\u3089\u3063\u305f\u306e\u3067\u3001\u3068\u308a\u3042\u3048\u305a\u4eca\u65e5\u306f\u4e00\u3064\u4f5c\u3063\u3066\u307f\u305f\u3002<\/p>\n<p><a href=\"http:\/\/ts-engine.net\/wp-content\/uploads\/2012\/07\/learning_perl_5th_edition.jpg\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/ts-engine.net\/wp-content\/uploads\/2012\/07\/learning_perl_5th_edition-225x300.jpg\" alt=\"\" title=\"Learning Perl 5th edition\" width=\"225\" height=\"300\" class=\"aligncenter size-medium wp-image-432\" srcset=\"http:\/\/ts-engine.net\/wp-content\/uploads\/2012\/07\/learning_perl_5th_edition-225x300.jpg 225w, http:\/\/ts-engine.net\/wp-content\/uploads\/2012\/07\/learning_perl_5th_edition.jpg 768w\" sizes=\"auto, (max-width: 225px) 100vw, 225px\" \/><\/a><\/p>\n<p><!--more--><\/p>\n<h2>\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3092\u306a\u3057\u3067\u30d5\u30a1\u30a4\u30eb\u3092\u307f\u308b\u30b9\u30af\u30ea\u30d7\u30c8<\/h2>\n<p>apache\u306ehttpd.conf\u3068\u304b\u307f\u305f\u3044\u3068\u304d\u3001\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3068\u304b\u306f\u629c\u304b\u3057\u3066\u8aad\u307f\u305f\u3044\u3067\u3059\u3088\u306d\u3002<br \/>\n\u3080\u3057\u308d\u3001\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u304c\u591a\u3059\u304e\u3067\u3001\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u306a\u3044\u3068\u3053\u3092\u629c\u304b\u3057\u3061\u3083\u3063\u305f\u308a\u3059\u308b\u3053\u3068\u304c\u3042\u308a\u307e\u3059\u3088\u306d\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u4eca\u56de\u306f\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u3057\u3066\u3044\u308b\u3068\u3053\u3092\u629c\u304b\u3057\u3066\u8868\u793a\u3059\u308bperl\u30b9\u30af\u30ea\u30d7\u30c8\u3092\u4f5c\u308a\u307e\u3057\u305f\u3002<br \/>\n\u4ee5\u4e0b\u306b\u30b3\u30fc\u30c9\u3092\u8a18\u8f09\u3057\u307e\u3059\u3002<\/p>\n<p>[perl]<\/p>\n<p>#!\/usr\/bin\/perl<br \/>\nuse strict;<br \/>\nuse warnings;<br \/>\n#\u7b2c\u4e00\u5f15\u6570\u3092\u30d5\u30a1\u30a4\u30eb\u3068\u3059\u308b<br \/>\n#\u7b2c\u4e8c\u5f15\u6570\u3092\u30b3\u30e1\u30f3\u30c8\u306e\u6587\u5b57\u3068\u3059\u308b<br \/>\nmy $file = $ARGV[0];<br \/>\nmy $letter = $ARGV[1];<\/p>\n<p>open(my $fh, &#8216;&lt;&#8216;, $file) or die &quot;\u30d5\u30a1\u30a4\u30eb\u3092\u958b\u304f\u306e\u3092\u5931\u6557\u3057\u307e\u3057\u305f&quot;;<br \/>\nmy $pattern = &quot;^([^$letter])(.+)&quot;;<br \/>\nwhile(my $line = &lt;$fh&gt;){<br \/>\n&gt;&#8212;if($line =~ \/$pattern\/){<br \/>\n&gt;&#8212;&gt;&#8212;print $line;<br \/>\n&gt;&#8212;&gt;&#8212;print &quot;\\n&quot;;<br \/>\n&gt;&#8212;}<br \/>\n&gt;&#8212;next;<br \/>\n}<br \/>\nclose $fh;<\/p>\n<p>[\/perl]<\/p>\n<p>\u7c21\u5358\u306b\u89e3\u8aac\u3059\u308b\u3068\u3001\u7b2c\u4e00\u5f15\u6570\u306b\u958b\u304d\u305f\u3044\u30d5\u30a1\u30a4\u30eb\u3001\u7b2c\u4e8c\u5f15\u6570\u306b\u30b3\u30e1\u30f3\u30c8\u30a2\u30a6\u30c8\u306e\u8a18\u53f7\u3092\u66f8\u304d\u307e\u3059\u3002<br \/>\n\uff08perl\u306a\u3089\u300c\uff03\u300d\uff09<\/p>\n<p>\u4f7f\u3046\u3068\u304d\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u4f7f\u3063\u3066\u4e0b\u3055\u3044\u3002\u672c\u30b9\u30af\u30ea\u30d7\u30c8\u306e\u30d5\u30a1\u30a4\u30eb\u540d\u3092\u300cnocomment.pl\u300d\u3068\u3057\u3066\u3044\u307e\u3059\u3002<\/p>\n<p>[bash]<br \/>\nbash-3.2$ perl nocomment.pl httpd.conf &quot;#&quot;<br \/>\n[\/bash]<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6700\u8fd1\u3001\u30a4\u30f3\u30d5\u30e9\u30a8\u30f3\u30b8\u30cb\u30a2\u3082\u304c\u3093\u304c\u3093\u30b3\u30fc\u30c9\u3092\u66f8\u304b\u306a\u3044\u3068\u3044\u3051\u306a\u3044\u304b\u3093\u3058\u306a\u306e\u3067\u3001perl\u3092\u52c9\u5f37\u3057\u3066\u3044\u308b\u3002 \u4e0a\u9054\u3059\u308b\u306b\u306f\u3001\u3084\u3063\u3071\u308a\u30b3\u30fc\u30c9\u3092\u304c\u3057\u304c\u3057\u66f8\u304f\u306e\u304c\u4e00\u756a\uff01\u3068\u3044\u3046\u30a2\u30c9\u30d0\u30a4\u30b9\u3092\u3082\u3089\u3063\u305f\u306e\u3067\u3001\u3068\u308a\u3042\u3048\u305a\u4eca\u65e5\u306f\u4e00\u3064\u4f5c\u3063\u3066\u307f\u305f\u3002<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26,20],"tags":[28],"class_list":["post-431","post","type-post","status-publish","format-standard","hentry","category-26","category-20","tag-perl"],"_links":{"self":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/posts\/431","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=431"}],"version-history":[{"count":0,"href":"http:\/\/ts-engine.net\/index.php?rest_route=\/wp\/v2\/posts\/431\/revisions"}],"wp:attachment":[{"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=431"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=431"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/ts-engine.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=431"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}