ktats****@users*****
ktats****@users*****
2012年 9月 2日 (日) 15:43:14 JST
Index: docs/articles/qntm.org/files/perl/perl.html diff -u docs/articles/qntm.org/files/perl/perl.html:1.10 docs/articles/qntm.org/files/perl/perl.html:1.11 --- docs/articles/qntm.org/files/perl/perl.html:1.10 Sun Sep 2 01:47:32 2012 +++ docs/articles/qntm.org/files/perl/perl.html Sun Sep 2 15:43:13 2012 @@ -26,10 +26,10 @@ <p class="original">Perl is a dynamic, dynamically-typed, high-level, scripting (interpreted) language most comparable with PHP and Python. Perl's syntax owes a lot to ancient shell scripting tools, and it is famed for its overuse of confusing symbols, the majority of which are impossible to Google for. Perl's shell scripting heritage makes it great for writing <i>glue code</i>: scripts which link together other scripts and programs. Perl is ideally suited for processing text data and producing more text data. Perl is widespread, popular, highly portable and well-supported. Perl was designed with the philosophy "There's More Than One Way To Do It" (TMTOWTDI) (contrast with Python, where "there should be one - and preferably only one - obvious way to do it").</p> -<p>Perlã¯åçãªãåçåä»ãã®ãé«ç´ãªãã¹ã¯ãªãã(ã¤ã³ã¿ã¼ããªã¿ã§è§£éããã)è¨èªã§ãPHPãPythonã¨ã¨ãã«ããæ¯è¼ããã¾ããPerlã®ã·ã³ã¿ãã¯ã¹ã¯ãæã®shellã¹ã¯ãªãããã¼ã«ããå¤ãã®é¨åãåãã¦ãããããã«ããæ··ä¹±ãããã·ã³ãã«ã使ãéãã¦ãããã¨ã§æåã§ãããããã®å¤§å¤æ°ãGoogleã§æ¤ç´¢ãããã¨ã¯ä¸å¯è½ã§ããPerlã®shellã¹ã¯ãªããããåãç¶ãã éºç£ã¯ã<i>glueã³ã¼ã</i>(ä»ã®ã¹ã¯ãªãããããã°ã©ã ã¨ä¸ç·ã«ãªã³ã¯ããã¦ããã¹ã¯ãªãã)ãæ¸ãã®ã«ã大å¤å½¹ã«ç«ã¡ã¾ããPerlã¯ãçæ³çã«ããã¹ããã¼ã¿ãå¦çãããã¨ããããã¹ããã¼ã¿ãçã¿åºããã¨ã«é©ãã¦ãã¾ããPerlã¯åºãè¡ã渡ããæåã§ããã極ãã¦ãã¼ã¿ãã«ã§ãååã«ãµãã¼ãããã¦ãã¾ããPerlã¯"There's More Than One Way To Do It(ããæ¹ã¯ã²ã¨ã¤ãããªã )" (TMTOWTDI)ã®å²å¦ã§ãã¶ã¤ã³ããã¾ãã(Pythonã¨æ¯è¼ããã¨ã"there should be one - and preferably only one - obvious way to do it(æãããªããæ¹ã¯ãã²ã¨ã¤ã§ããã¹ãã§ããããããã²ã¨ã¤ã®ã¿ã§ããã¹ã)")ã</p> +<p>Perlã¯åçãªãåçåä»ãã®ãé«ç´ãªãã¹ã¯ãªãã(ã¤ã³ã¿ã¼ããªã¿ã§è§£éããã)è¨èªã§ãPHPãPythonã¨ã¨ãã«ããæ¯è¼ããã¾ããPerlã®ã·ã³ã¿ãã¯ã¹ã¯ãæã®shellã¹ã¯ãªãããã¼ã«ããå¤ãã®é¨åãåãã¦ãããããã«ããæ··ä¹±ãããã·ã³ãã«ã使ãéãã¦ãããã¨ã§æåã§ãããããã®å¤§å¤æ°ãGoogleã§æ¤ç´¢ãããã¨ã¯ä¸å¯è½ã§ããPerlã®shellã¹ã¯ãªããããåãç¶ãã éºç£ã¯ã<i>glueã³ã¼ã</i>(ä»ã®ã¹ã¯ãªãããããã°ã©ã ã¨ä¸ç·ã«ãªã³ã¯ããã¦ããã¹ã¯ãªãã)ãæ¸ãã®ã«ã大å¤å½¹ã«ç«ã¡ã¾ããPerlã¯ãçæ³çã«ããã¹ããã¼ã¿ãå¦çãããã¨ããããã¹ããã¼ã¿ãçæããã®ã«é©ãã¦ãã¾ããPerlã¯åºãè¡ã渡ããæåã§ããã極ãã¦ãã¼ã¿ãã«ã§ãååã«ãµãã¼ãããã¦ãã¾ããPerlã¯"There's More Than One Way To Do It(ããæ¹ã¯ã²ã¨ã¤ãããªã) " (TMTOWTDI)ã®å²å¦ã§ãã¶ã¤ã³ããã¾ãã(Pythonã¨æ¯è¼ããã¨ã"there should be one - and preferably only one - obvious way to do it(æãããªããæ¹ã¯ãã²ã¨ã¤ã§ããã¹ãã§ããããããã²ã¨ã¤ã®ã¿ã§ããã¹ã)")ã</p> <p class=original>Perl has horrors, but it also has some great redeeming features. In this respect it is like every other programming language ever created.</p> -<p>Perlã«ã¯æãããã¨ãããããã¾ããããããè£ã£ã¦ä½ãããã¨ãããããã¾ãããã®ç¹ã§ãä»ã¾ã§ã«ä½ãããå ¨ã¦ã®ä»ã®ããã°ã©ãã³ã°è¨èªã¨åãã§ãã</p> +<p>Perlã«ã¯æãããã¨ãããããã¾ããããããè£ã£ã¦ä½ãããè¯ããããã¾ãããã®ç¹ã§ãä»ã¾ã§ã«ä½ãããå ¨ã¦ã®ä»ã®ããã°ã©ãã³ã°è¨èªã¨åãã§ãã</p> <p class=original>This document is intended to be informative, not evangelical. It is aimed at people who, like me:</p> <p>ãã®ããã¥ã¡ã³ãã¯ãæ å ±ãä¸ãããã¨ãæå³ãã¦ãããç±å¿ã«æ®åããããã®ã§ã¯ããã¾ããã以ä¸ã®ãããªãç§ã®ãããªäººåãã®ãã®ã§ã:</p> <ul class=original> @@ -42,8 +42,8 @@ <ul> <li>æè¡çéãã¦ãä¸è¬çã§ã¯ãªãã¨ãã¸ã±ã¼ã¹ã«å¤ãã®é¨åãå²ãã¦ãã<a href="http://perl.org">http://perl.org/</a>ã«ãããå ¬å¼ã®Perlã®ããã¥ã¡ã³ããå«ã</li> - <li>"åçã¨ä¾"ã§ãã£ãã¨å¦ã³ãã</li> - <li>Larry Wallã«ã¯ã£ããè¨ã£ã¦ã»ãã</li> + <li>"åçã¨ä¾"ã§æ°ããããã°ã©ãã³ã°è¨èªãã£ãã¨å¦ã³ãã</li> + <li>Larry Wallã«ã¯ã£ããè¨ã£ã¦ã»ããã¨æã£ã¦ãã</li> <li>ä¸è¬çãªç¨èªã§ããã°ã©ã ãããã¨ããã§ã«ç¥ã£ã¦ãã</li> <li>ä»äºãçµããããã«ä½ãå¿ è¦ãã¨ãããã¨ä»¥ä¸ã®ãã¨ãPerlã«ã¤ãã¦æ°ã«ããªã</li> </ul> @@ -56,7 +56,7 @@ <h2>åæ¸ã</h2> <ul class=original> <li><p class="original">The following can be said of almost every declarative statement in this document: "that's not, strictly speaking, true; the situation is actually a lot more complicated". If you see a serious lie, point it out, but I reserve the right to preserve certain critical lies-to-children.</p> -<p>以ä¸ã®ãã¨ãããã®ããã¥ã¡ã³ãå ã®ã»ã¨ãã©ãã¹ã¦ã®å®£è¨æã§è¨ããã¨ãåºæ¥ã¾ã: "ããã¯ãå³æ ¼ãªæå³ã§ã®ãçå®ã§ã¯ããã¾ãã; ç¶æ³ã¯å®éã«ã¯ãã£ã¨è¤éã§ã"ãç§ã¯æ æã«åé¡ã®"å®å ¨ãªçå®"ããããã調ã¹ããã¨ããçç¥ããããç¡è¦ãã¦ãã¾ãããããã¯ãã¢ã¤ã³ã·ã¥ã¿ã¤ã³ã®å ´ã®æ¹ç¨å¼ã§7å¹´çã®ç©çå¦ã®å¦çãå§ããã®ã«æå³ããªãã®ã¨åãçç±ã§ããããæ·±å»ãªåãè¦ã¤ããããææãã¦ãã ãããã§ãããç§ã«ã¯åã©ãã«ã¤ãéè¦ãªåããã®ã¾ã¾ã«ãã¦ãã権å©ãããã¾ãã</p></li> +<p>以ä¸ã®ãã¨ãããã®ããã¥ã¡ã³ãå ã®ã»ã¨ãã©ãã¹ã¦ã®å®£è¨æã§è¨ããã¨ãåºæ¥ã¾ã: "ããã¯ãå³æ ¼ãªæå³ã§ã®ãçå®ã§ã¯ããã¾ãã; ç¶æ³ã¯å®éã«ã¯ãã£ã¨è¤éã§ã"ãããæ·±å»ãªåãè¦ã¤ããããææãã¦ãã ãããã§ãããç§ã«ã¯åã©ãã«ã¤ãéè¦ãªåããã®ã¾ã¾ã«ãã¦ãã権å©ãããã¾ãã</p></li> <li><p class="original">Throughout this document I'm using example <code>print</code> statements to output data but not explicitly appending line breaks. This is done to prevent me from going crazy and to give greater attention to the actual string being printed in each case, which is invariably more important. In many examples, this results in alotofwordsallsmusheduptogetherononeline if the code is run in reality. Try to ignore this. </p> <p>ãã®ããã¥ã¡ã³ããéãã¦ãä¾ã«ããã¦<code>print</code>ã¹ãã¼ãã¡ã³ãããã¼ã¿ãåºåããããã«ä½¿ã£ã¦ãã¾ãããæ示çã«æ¹è¡ã追å ãã¦ãã¾ãããããã¯ãç§ãæ°éãã«ãããªãããã§ãããããããã®ã±ã¼ã¹ã§åºåããããããéè¦ãªå®éã®æååã«å¤ãã®æ³¨æãåããããããã§ããå¤ãã®ä¾ã§ãå®éã«ã³ã¼ããåããã¨ãalotofwordsallsmusheduptogetherononelineã®ãããªçµæã«ãªãã¾ããç¡è¦ãã¦ãã ããã</p></li> </ul> @@ -107,7 +107,7 @@ <li>a string</li> <li>a reference to any other variable.</li> </ul> -<ul class=original> +<ul> <li><code>undef</code> (Pythonã«ããã<code>None</code>ãPHPã®<code>null</code>ã«å¯¾å¿)</li> <li>æ°å (Perlã¯integerã¨floatãåºå¥ãã¾ãã)</li> <li>æå</li> @@ -179,7 +179,7 @@ <p class=original>The lesson is to always using the correct operator in the correct situation. There are separate operators for comparing scalars as numbers and comparing scalars as strings:</p> <p>ãã®ã¬ãã¹ã³ã§ã¯ãæ£ããç¶æ³ã§æ£ããæ¼ç®åã使ãããã«ãã¦ãã¾ããæ°åã¨ãã¦ã¹ã«ã©ãæ¯è¼ããã®ã¨ãæååã¨ãã¦ã¹ã«ã©ãæ¯è¼ããã®ã¨ã§ã¯ãæ¼ç®åãåºå¥ãã¾ãã:</p> -<pre class="perl prettyprint"> +<pre class="perl original"> # Numerical operators: <, >, <=, >=, ==, !=, <=>, +, * # String operators: <a href="http://perldoc.perl.org/perlop.html#Equality-Operators">lt, gt, le, ge, eq, ne, cmp</a>, <a href="http://perldoc.perl.org/perlop.html#Multiplicative-Operators">.</a>, <a href="http://perldoc.perl.org/perlop.html#Multiplicative-Operators">x</a> </pre> @@ -689,10 +689,9 @@ <h3 class="original">Getting information out of a data structure</h3> <h3>ãã¼ã¿æ§é ããæ å ±ãåãåºã</h3> -<p class="original">Now, let's assume that you still have <code>%account</code> kicking around but everything else (if there was anything else) has fallen out of scope. You can print the information out by reversing the same procedure in each case. Again, here are -four examples, of which the last is the most useful:</p> +<p class="original">Now, let's assume that you still have <code>%account</code> kicking around but everything else (if there was anything else) has fallen out of scope. You can print the information out by reversing the same procedure in each case. Again, here are four examples, of which the last is the most useful:</p> -<p>ãã¦ãããããã¾ãã<code>%account</code>ãã¾ã ããã¨ãã¾ããããã§ãããå ¨ã¦ã®ä»ã®ãã®(ä»ã®ãã®ããã£ããªã)ã¯ãã¹ã³ã¼ãã®å¤ã«è½ã¡ã¾ããããããã®ã±ã¼ã¹ã§åãæé ãéåãã«ãããã¨ã§ãæ å ±ã表示ã§ãã¾ããããä¸åº¦ã4ã¤ã®ä¾ãããã¾ãããæå¾ã®ãã®ãä¸çªæç¨ã§ãã</p> +<p>ãã¦ãããããã¾ããããã«<code>%account</code>ãã¾ã ããã¨ãã¾ããããã§ãããå ¨ã¦ã®ä»ã®ãã®(ä»ã®ãã®ããã£ããªã)ã¯ãã¹ã³ã¼ãã®å¤ã«è½ã¡ã¾ããããããã®ã±ã¼ã¹ã§åãæé ãéåãã«ãããã¨ã§ãæ å ±ã表示ã§ãã¾ããããä¸åº¦ã4ã¤ã®ä¾ãããã¾ãããæå¾ã®ãã®ãä¸çªæç¨ã§ãã</p> <pre class="perl prettyprint"> my $ownersRef = $account{"owners"}; @@ -751,21 +750,21 @@ <h3>é åã®ãªãã¡ã¬ã³ã¹ã§èªåã§èªåã®è¶³ãæã¤æ¹æ³</h3> <p class=original>This array has five elements:</p> -<p>ãã®é åã«ã¯5ã¤ã®è¦ç´ ãããã¾ã:</p> +<p>次ã®é åã«ã¯5ã¤ã®è¦ç´ ãããã¾ã:</p> <pre class="perl prettyprint"> my @array1 = (1, 2, 3, 4, 5); print @array1; # "12345" </pre> <p class=original>This array, however, has ONE element (which happens to be a reference to an anonymous, five-element array):</p> -<p>ãã®é åã«ã¯ã²ã¨ã¤ã®è¦ç´ (ç¡åã®5ã¤ã®è¦ç´ ã®é åã®ãªãã¡ã¬ã³ã¹)ãããã¾ã:</p> +<p>ãããã次ã®é åã«ã¯*ã²ã¨ã¤*ã®è¦ç´ (ç¡åã®5ã¤ã®è¦ç´ ã®é åã®ãªãã¡ã¬ã³ã¹)ãããã¾ã:</p> <pre class="perl prettyprint"> my @array2 = [1, 2, 3, 4, 5]; print @array2; # e.g. "ARRAY(0x182c180)" </pre> <p class=original>This <em>scalar</em> is a reference to an anonymous, five-element array:</p> -<p>ãã® <em>ã¹ã«ã©</em> ã¯ãç¡åã®5ã¤ã®è¦ç´ ã®é åã®ãªãã¡ã¬ã³ã¹ã«ãªãã¾ã:</p> +<p>次㮠<em>ã¹ã«ã©</em> ã¯ãç¡åã®5ã¤ã®è¦ç´ ã®é åã®ãªãã¡ã¬ã³ã¹ã«ãªãã¾ã:</p> <pre class="perl prettyprint"> my $array3Ref = [1, 2, 3, 4, 5]; print $array3Ref; # e.g. "ARRAY(0x22710c0)" @@ -853,7 +852,7 @@ </pre> <p class=original><code>if</code> statements evaluate their conditions in scalar context. For example, <code>if(@array)</code> returns true if and only if <code>@array</code> has 1 or more elements. It doesn't matter what those elements are - they may contain <code>undef</code> or other false values for all we care.</p> -<p><code>if/code>æã§ã¯ããããã®æ¡ä»¶ãã¯ã¹ã«ã©ã³ã³ããã¹ãã§ä¾¡ããã¾ãã<code>if(@array)</code>ã¯ã<code>@array</code>ã«ã²ã¨ã¤ä»¥ä¸ã®ã¨ã¬ã¡ã³ããããå ´åã®ã¿ãçã¨ãªãã¾ããé åã®ä¸ã®å¤ãä½ãã¯åé¡ã«ãã¾ãã - å ¨ã¦ã<code>undef</code>ãä»ã®å½ã®å¤ã§ã</p> +<p><code>if</code>æã§ã¯ããããã®æ¡ä»¶ãã¯ã¹ã«ã©ã³ã³ããã¹ãã§ä¾¡ããã¾ãã<code>if(@array)</code>ã¯ã<code>@array</code>ã«ã²ã¨ã¤ä»¥ä¸ã®ã¨ã¬ã¡ã³ããããå ´åã®ã¿ãçã¨ãªãã¾ããé åã®ä¸ã®å¤ãä½ãã¯åé¡ã«ãã¾ãã - å ¨ã¦ã<code>undef</code>ãä»ã®å½ã®å¤ã§ã</p> <h2 class=original>Loops</h2> <h2>ã«ã¼ã</h2> @@ -883,7 +882,7 @@ </pre> <p class="original">These <code>do</code> loops are <em>almost</em> equivalent (a warning would be raised if <code>@array</code> were empty):</p> -<p>ãããã®<code>do</code>ã«ã¼ãã¯ã<em>ã»ã¨ãã©</em>åãã§ã(<code>@array</code>ã空ã®å ´åè¦åãèµ·ãã¾ã):</p> +<p>ãããã®<code>do</code>ã«ã¼ãã¯ã<em>ã»ã¨ãã©</em>åãã§ã<!-- (<code>@array</code>ã空ã®å ´åè¦åãèµ·ãã¾ã) -->:</p> <pre class="perl prettyprint"> my $i = 0; @@ -967,7 +966,7 @@ <p class=original><code>next</code> and <code>last</code> can be used to control the progress of a loop. In most programming languages these are known as <code>continue</code> and <code>break</code> respectively. We can also optionally provide a label for any loop. By convention, labels are written in <code>ALLCAPITALS</code>. Having labelled the loop, <code>next</code> and <code>last</code> may target that label. This example finds primes below 100:</p> -<p><code>next</code> 㨠<code>last</code>ã¯ã«ã¼ãé²ã¿ãå¶å¾¡ããã®ã«ä½¿ããã¾ããå¤ãã®ããã°ã©ãã³ã°è¨èªã§ã¯ãããããã<code>continue</code> 㨠<code>break</code>ã¨ãªã£ã¦ãã¾ãããªãã·ã§ã³ã§ãã©ã®ã«ã¼ãã«ãã©ãã«ãã¤ãããã¨ãã§ãã¾ããæ £ä¾ã«ãããã©ãã«ã¯ <code>å ¨ã¦å¤§æåã§</code>æ¸ããã¨ã«ãªã£ã¦ãã¾ããã«ã¼ãã«ã©ãã«ãã¤ãããã¨ã§ã<code>next</code> 㨠<code>last</code> ã«ã©ãã«ã対象ã«ã§ãã¾ãã100æªæºã®ç´ æ°ãè¦ã¤ããä¾ã§ã:</p> +<p><code>next</code> 㨠<code>last</code>ã¯ã«ã¼ãé²ã¿ãå¶å¾¡ããã®ã«ä½¿ããã¾ããå¤ãã®ããã°ã©ãã³ã°è¨èªã§ã¯ãããããã<code>continue</code> 㨠<code>break</code>ã¨ãªã£ã¦ãã¾ãããªãã·ã§ã³ã§ãã©ã®ã«ã¼ãã«ãã©ãã«ãã¤ãããã¨ãã§ãã¾ããæ £ä¾ã«ãããã©ãã«ã¯<code>å ¨ã¦å¤§æåã§</code>æ¸ããã¨ã«ãªã£ã¦ãã¾ããã«ã¼ãã«ã©ãã«ãã¤ãããã¨ã§ã<code>next</code> 㨠<code>last</code> ã«ã©ãã«ã対象ã«ã§ãã¾ãã100以ä¸ã®ç´ æ°ãè¦ã¤ããä¾ã§ã:</p> <pre class="perl prettyprint"> CANDIDATE: for my $candidate ( 3 .. 100 ) { @@ -1054,7 +1053,7 @@ </pre> <p class=original>The <code><a href="http://perldoc.perl.org/functions/map.html">map</a></code> function takes an array as input and applies an operation to every scalar <code>$_</code> in this array. It then constructs a new array out of the results. The operation to perform is provided in the form of a single expression inside braces:</p> -<p><code>map</code>é¢æ°ã¯å ¥åã¨ãã¦é åãã¨ããé åå ã®å ¨ã¦ã®ã¹ã«ã© <code>$_</code>ãæä½ãã¾ããçµæã¨ãã¦æ°ããé åãä½ãã¾ããæä½ã¯ã²ã¨ã¤ã®ãã¬ã¼ã¹ã§æ¸¡ãã¾ã::</p> +<p><code>map</code>é¢æ°ã¯å ¥åã¨ãã¦é åãã¨ããé åå ã®å ¨ã¦ã®ã¹ã«ã© <code>$_</code>ãæä½ãã¾ããçµæã¨ãã¦æ°ããé åãä½ãã¾ããæä½ã¯ã²ã¨ã¤ã®ãã¬ã¼ã¹ã§æ¸¡ãã¾ã:</p> <pre class="perl prettyprint"> my @capitals = ("Baton Rouge", "Indianapolis", "Columbus", "Montgomery", "Helena", "Denver", "Boise"); @@ -1148,7 +1147,6 @@ <ul> <li>ãããããã</li> <li>ã¨ã¦ã便å©</li> - <li>are </li> <li><a href="http://perldoc.perl.org/perlfunc.html">åºãããã¥ã³ãå</a>ããã¦ãã</li> <li>ã·ã³ã¿ãã¯ã¹ã§å¤§ããç°ãªãã®ã§ãããã¥ã¡ã³ããè¦ããã¨</li> <li>å¼æ°ã¨ãã¦æ£è¦è¡¨ç¾ãåãä»ãããã®ããã</li> @@ -1303,11 +1301,11 @@ <h2 class="original">System calls</h2> <h2>ã·ã¹ãã ã³ã¼ã«</h2> <p class="original">Apologies if you already know the following non-Perl-related facts. Every time a process finishes on a Windows or Linux system (and, I assume, on most other systems), it concludes with a 16-bit <i>status word</i>. The highest 8 bits constitute a <i>return code</i> between 0 and 255 inclusive, with 0 conventionally representing unqualified success, and other values representing various degrees of failure. The other 8 bits are less frequently examined - they "reflect mode of failure, like signal death and core dump information".</p> -<p>æ¢ã«ä»¥ä¸ã®Perlã¨é¢ä¿ãªãäºå®ããåç¥ã§ãããç³ã訳æãã¾ãããWindowãLinux(ã¾ããå¤ãã®ä»ã®ã·ã¹ãã ã§ãåæ§ã¨æ³å®ããã¾ããã)ã®ã·ã¹ãã ã§ã¯ããã»ã¹ãçµãããã³ã«ã16ãããã®<i>ç¶æ ã¯ã¼ã</i>ã§çµäºãã¾ããä¸ä½ã®8ãããã¯0ã255ã®éãå«ã<i>ãªã¿ã¼ã³ã³ã¼ã</i>ãæ§æãã¾ãã0ã¯æ £ä¾çã«ãç¡æ¡ä»¶ã§æåãããã¨ã示ãã¾ããä»ã®å¤ã¯æ§ã ãªåº¦åãã®å¤±æã示ãã¾ããä»ã®8ãããã¯ãã¾ããã調ã¹ããã¾ãããããããã¯"ã·ã°ãã«ã®æ»äº¡ãã³ã¢ãã³ãã®æ å ±ã®ãããªå¤±æã®ã¢ã¼ããåæ ãã¾ã"ã</p> +<p>æ¢ã«ä»¥ä¸ã®Perlã¨é¢ä¿ãªãäºå®ããåç¥ã§ãããç³ã訳æãã¾ãããWindowãLinux(ã¾ããå¤ãã®ä»ã®ã·ã¹ãã ã§ãåæ§ã¨æ³å®ããã¾ãã)ã®ã·ã¹ãã ã§ã¯ããã»ã¹ãçµãããã³ã«ã16ãããã®<i>ç¶æ ã¯ã¼ã</i>ã§çµäºãã¾ããä¸ä½ã®8ãããã¯0ã255ã®éãå«ã<i>ãªã¿ã¼ã³ã³ã¼ã</i>ãæ§æãã¾ãã0ã¯æ £ä¾çã«ãç¡æ¡ä»¶ã§æåãããã¨ã示ãã¾ããä»ã®å¤ã¯æ§ã ãªåº¦åãã®å¤±æã示ãã¾ããä»ã®8ãããã¯ãã¾ããã調ã¹ããã¾ãããããããã¯"ã·ã°ãã«ã®æ»äº¡ãã³ã¢ãã³ãã®æ å ±ã®ãããªå¤±æã®ã¢ã¼ããåæ ãã¾ã"ã</p> <p class="original">You can exit from a Perl script with the return code of your choice (from 0 to 255) using <code><a href="http://perldoc.perl.org/functions/exit.html">exit</a></code>.</p> <p>Perlããçµäºããéã«ã<code><a href="http://perldoc.perl.org/functions/exit.html">exit</a></code>ã使ã£ã¦(0ãã255ã¾ã§ã®)好ããªãªã¿ã¼ã³ã³ã¼ããè¿ãã¾ãã</p> <p class="original">Perl provides More Than One Way To - in a single call - spawn a child process, pause the current script until the child process has finished, and then resume interpretation of the current script. Whichever method is used, you will find that immediately afterwards, the <a href="http://perldoc.perl.org/perlvar.html">built-in scalar variable</a> <code>$?</code> has been populated with the status word that was returned from that child process's termination. You can get the return code by taking just the highest 8 of those 16 bits: <code>$? >> 8</code>.</p> -<p>Perlã«ã¯ä¸ã¤ä»¥ä¸ã® - åããã»ã¹ãç£ã - æ¹æ³ãããã¾ããç¾å¨ã®ã¹ã¯ãªãããæ¢ããåããã»ã¹ãçµãã£ãããç¾å¨ã®ã¹ã¯ãªããã®è§£éãç¶ãã¾ããã©ã®æ¹æ³ã使ã£ã¦ãããã®ç´å¾ã§ãåããã»ã¹ã®çµäºæã«è¿ãããç¶æ ã¯ã¼ããå ¥ã£ã¦ããã<a href="http://perldoc.perl.org/perlvar.html">çµè¾¼ã®ã¹ã«ã©å¤æ°</a>ã®<code>$?</code>ã«å ¥ãã¾ããè¿ãããå¤ã®16ãããã®ä¸ä½8ãåããã¨ã§ããªã¿ã¼ã³ã³ã¼ããå¾ããã¨ãã§ãã¾ã: <code>$? >> 8</code>ã</p> +<p>Perlã«ã¯ä¸ã¤ä»¥ä¸ã® - åããã»ã¹ãç£ã - æ¹æ³ãããã¾ããç¾å¨ã®ã¹ã¯ãªãããæ¢ããåããã»ã¹ãçµãã£ãããç¾å¨ã®ã¹ã¯ãªããã®è§£éãç¶ãã¾ããã©ã®æ¹æ³ã使ã£ã¦ãããã®ç´å¾ã§ãåããã»ã¹ã®çµäºæã«è¿ãããç¶æ ã¯ã¼ãã<a href="http://perldoc.perl.org/perlvar.html">çµè¾¼ã®ã¹ã«ã©å¤æ°</a>ã®<code>$?</code>ã«å ¥ãã¾ããè¿ãããå¤ã®16ãããã®ä¸ä½8ãåããã¨ã§ããªã¿ã¼ã³ã³ã¼ããå¾ããã¨ãã§ãã¾ã: <code>$? >> 8</code>ã</p> <p class="original">The <code>system</code> function can be used to invoke another program with the arguments listed. The value returned by <code>system</code> is the same value with which <code>$?</code> is populated:</p> <p><code>system</code>é¢æ°ã¯ä»ã®ããã°ã©ã ãå¼æ°ã®ãªã¹ãã¨ä¸ç·ã«å¼ã³åºãã¾ãã<code>system</code>ã«ãã£ã¦è¿ãããå¤ã¯ã<code>$?</code>ã«å ¥ãã®ã¨åãå¤ã§ã:</p> <pre class="perl prettyprint"> @@ -1338,7 +1336,7 @@ <p>ã¹ã«ã©å¤æ°ã¯ãæ°å/æåå/ãªãã¡ã¬ã³ã¹ã<code>undef</code>ã®ä»£ããã«<i>ãã¡ã¤ã«ãã³ãã«</i>ãæã¦ã¾ãããã¡ã¤ã«ãã³ãã«ã¯åºæ¬çã«ç¹å®ã®ãã¡ã¤ã«ã®ç¹å®ã®å ´æã示ããªãã¡ã¬ã³ã¹ã§ãã</p> <p class=original>Use <code><a href="http://perldoc.perl.org/functions/open.html">open</a></code> to turn a scalar variable into a file handle. <code>open</code> must be supplied with a <i>mode</i>. The mode <code><</code> indicates that we wish to open the file to read from it:</p> -<p><code><a href="http://perldoc.perl.org/functions/open.html">open</a></code>ã使ã£ã¦ãã¹ã«ã©å¤æ°ããã¡ã¤ã«ãã³ãã«ã«ãã¾ãã<code>open</code>ã¯<i>ã¢ã¼ã</i>ã¨ã¨ãã«ä½¿ãããªããã°ããã¾ãããã¢ã¼ã<code><</code>ã¯ããã¡ã¤ã«ããèªã¿åºããããã¨ãæå³ãã¾ã:</p> +<p><code><a href="http://perldoc.perl.org/functions/open.html">open</a></code>ã使ã£ã¦ãã¹ã«ã©å¤æ°ããã¡ã¤ã«ãã³ãã«ã«ãã¾ãã<code>open</code>ã¯<i>ã¢ã¼ã</i>ã¨ã¨ãã«ä½¿ãããªããã°ããã¾ãããã¢ã¼ã <code><</code> ã¯ããã¡ã¤ã«ããèªã¿åºããããã¨ãæå³ãã¾ã:</p> <pre class="perl prettyprint"> my $f = "text.txt"; @@ -1350,7 +1348,7 @@ </pre> <p class="original">As seen above, you should always check that the <code>open</code> operation completed successfully. If successful, <code>open</code> returns a true value. Otherwise, it returns false and an error message is stuffed into the built-in variable <code>$!</code>. This checking being rather tedious, a common idiom is:</p> -<p>ä¸ã®ããã«ã<code>open</code> æ¼ç®åãå®å ¨ã«æåãããã常ã«ãã§ãã¯ãã¹ãã§ããæåããã°<code>open</code>çãè¿ãã¾ããããã§ãªããã°ã<code>undef</code>ãè¿ãã¾ãããã®ãã§ãã¯ã®æç¶ãã¯éå±ã§ãããããã¿ãããã¤ãã£ãªã ã¯æ¬¡ã®ãã®ã§ã:</p> +<p>ä¸ã®ããã«ã<code>open</code> æ¼ç®åãå®å ¨ã«æåãããã常ã«ãã§ãã¯ãã¹ãã§ããæåããã°<code>open</code>ã¯çãè¿ãã¾ããããã§ãªããã°ã<code>undef</code>ãè¿ãã¾ãããã®ãã§ãã¯ã®æç¶ãã¯éå±ã§ãããããã¿ãããã¤ãã£ãªã ã¯æ¬¡ã®ãã®ã§ã:</p> <pre class="perl prettyprint"> open(my $fh, "<", $f) || die "Couldn't open '".$f."' for reading because: ".$!; @@ -1374,7 +1372,7 @@ chomp $line; </pre> <p class="original">Note that <code>chomp</code> acts on <code>$line</code> in place. <code>$line = chomp $line</code> is probably not what you want.</p> -<p><code>chomp</code>㯠<code>$line</code>ã«å¯¾ãã¦ãã®å ´ã§åãã¾ãã<code>$line = chomp $line</code>ã¯å¤åãæã¿ã®ãï½oã§ã¯ãªãã§ãããã</p> +<p><code>chomp</code>㯠<code>$line</code>ã«å¯¾ãã¦ãã®å ´ã§åãã¾ãã<code>$line = chomp $line</code>ã¯å¤åãæã¿ã®ãã®ã§ã¯ãªãã§ãããã</p> <p class="original">You can also use <code><a href="http://perldoc.perl.org/functions/eof.html">eof</a></code> to detect that the end of the file has been reached:</p> <p><code><a href="http://perldoc.perl.org/functions/eof.html">eof</a></code>ã使ã£ã¦ãã¡ã¤ã«ã®çµç«¯ãå¤æãããã¨ãã§ãã¾ã:</p> @@ -1400,7 +1398,7 @@ } </pre> <p class="original">Writing to a file involves first opening it in a different mode. The mode <code>></code> indicates that we wish to open the file to write to it. (<code>></code> will clobber the content of the target file if it already exists and has content. To merely append to an existing file, use mode <code>>></code>). Then, simply provide the filehandle as a zeroth argument for the <code>print</code> function.</p> -<p>ãã¡ã¤ã«ã«æ¸ãè¾¼ãå ´åã¯ãéã£ãã¢ã¼ãã§æåã«éãã¾ããã¢ã¼ã<code>></code>ã¯ãæ¸ãè¾¼ã¿ç¨ã«ãã¡ã¤ã«ãéããã¨ãæ示ãã¾ãã(<code>></code>ã¯ãç®çã®ãã¡ã¤ã«ã®ä¸èº«ããåãã¾ããåç´ã«ã追å ãããå ´åã¯ã<code>>></code>ã®ã¢ã¼ãã使ãã¾ã)ãããããã<code>print</code>é¢æ°ã®0çªç®ã®å¼æ°ã¨ãã¦ããã¡ã¤ã«ãã³ãã«ãåã«æ¸¡ãã¾ãã</p> +<p>ãã¡ã¤ã«ã«æ¸ãè¾¼ãå ´åã¯ãéã£ãã¢ã¼ãã§æåã«éãã¾ããã¢ã¼ã <code>></code> ã¯ãæ¸ãè¾¼ã¿ç¨ã«ãã¡ã¤ã«ãéããã¨ãæ示ãã¾ãã(<code>></code>ã¯ãç®çã®ãã¡ã¤ã«ã®ä¸èº«ãå£ãã¾ããåç´ã«ã追å ãããå ´åã¯ã<code>>></code> ã®ã¢ã¼ãã使ãã¾ã)ãããããã<code>print</code>é¢æ°ã®0çªç®ã®å¼æ°ã¨ãã¦ããã¡ã¤ã«ãã³ãã«ãåã«æ¸¡ãã¾ãã</p> <pre class="perl prettyprint"> open(my $fh2, ">", $f) || die "Couldn't open '".$f."' for writing because: ".$!; print $fh2 "The eagles have left the nest"; @@ -1409,7 +1407,7 @@ <p><code>print</code>ã§<code>$fh2</code>ã¨æ¬¡ã®å¼æ°ã®éã«ã«ã³ãããªããã¨ã«æ°ãã¤ãã¦ãã ããã</p> <p class=original>File handles are actually closed automatically when they drop out of scope, but otherwise:</p> -<p>ãã¡ã¤ã«ãã³ãã«ã¯ã¹ã³ã¼ããæããã¨èªåçã«éãããã¾ãããããã¯:</p> +<p>ãã¡ã¤ã«ãã³ãã«ã¯ã¹ã³ã¼ããæããã¨èªåçã«éãããã¾ãããããã¯ã次ã®ããã«ãã¾ã:</p> <pre class="perl prettyprint"> <a href="http://perldoc.perl.org/functions/close.html">close</a> $fh2; @@ -1444,7 +1442,7 @@ <p class=original>The function <code>-f</code> is a built-in function which tests whether the named file is a plain file.</p> <p>é¢æ°<code>-f</code> ã¯çµè¾¼ã®é¢æ°ã§ä¸ããããååã®ãã¡ã¤ã«ãæ®éã®ãã¡ã¤ã«ãã©ããããã¹ããã¾ãã</p> <p class=original>These are just three of <a href="http://perldoc.perl.org/functions/-X.html">a large class of functions</a> of the form <code>-X</code> where <code>X</code> is some lower- or upper-case letter. These functions are called <i>file tests</i>. Note the leading minus sign. In a Google query, the minus sign indicates to exclude results containing this search term. This makes file tests hard to Google for! Just search for "perl file test" instead.</p> -<p><code>-X</code>å½¢å¼ã®<a href="http://perldoc.perl.org/functions/-X.html">大ããªã¯ã©ã¹ã®é¢æ°</a>ã®3ã¤ã®é¢æ°ã§ãã<code>X</code>ã¯å°æåã大æåã§ãããããã®é¢æ°ã¯<i>ãã¡ã¤ã«ãã¹ã</i>ã¨å¼ã°ãã¾ãããã¤ãã¹è¨å·ãå ã«æ¥ããã¨ã«æ°ãã¤ãã¦ãã ãããGoogleã¯ã¨ãªã§ã¯ããã¤ãã¹è¨å·ã¯ããã®è¨èãçµæã«å«ããªããã¨ãæ示ãã¾ãããã®ããããã¡ã¤ã«ãã¹ããGoogleã§æ¤ç´¢ãã¥ãããã¦ãã¾ã! 代ããã«ã"perl file test"ã§æ¤ç´¢ãã¦ä¸ããã</p> +<p><code>-X</code>å½¢å¼ã®<a href="http://perldoc.perl.org/functions/-X.html">大ããªã¯ã©ã¹ã®é¢æ°</a>ã®3ã¤ã®é¢æ°ã§ãã<code>X</code>ã¯å°æåã大æåã§ãããããã®é¢æ°ã¯<i>ãã¡ã¤ã«ãã¹ã</i>ã¨å¼ã°ãã¾ãããã¤ãã¹è¨å·ãå ã«æ¥ããã¨ã«æ°ãã¤ãã¦ãã ãããGoogleã¯ã¨ãªã§ã¯ããã¤ãã¹è¨å·ã¯ããã®è¨èãçµæã«å«ããªããã¨ãæ示ãã¾ãããã®ããããã¡ã¤ã«ãã¹ããGoogleã§æ¤ç´¢ãã¥ãããã¦ãã¾ã! 代ããã«ã "perl file test"(訳註: "perl ãã¡ã¤ã«ãã¹ã")ã§æ¤ç´¢ãã¦ä¸ããã</p> <h2 class="original">Regular expressions</h2> <h2>æ£è¦è¡¨ç¾</h2> @@ -1578,7 +1576,7 @@ </pre> <p class=original>Once the Perl module is created and <code>perl</code> knows where to look for it, you can use the <code>require</code> built-in function to search for and execute it during a Perl script. For example, calling <code>require Demo::StringUtils</code> causes the Perl interpreter to search each directory listed in <code>PERL5LIB</code> in turn, looking for a file called <code>Demo/StringUtils.pm</code>. After the module has been loaded, the subroutines and variables that were defined there suddenly become available in the main script. Our example script might be called <code>main.pl</code> and read as follows:</p> -<p>Perlã¢ã¸ã¥ã¼ã«ãä½ããã¦ã<code>perl</code>ããããã©ãã«ããããç¥ã£ã¦ããã°ãçµè¾¼ã®<code>require</code>é¢æ°ã使ã£ã¦æ¢ããPerlã®ã¹ã¯ãªããä¸ã§å®è¡ãããã¨ãã§ãã¾ããä¾ãã°ã<code>require Demo::StringUtils</code>ãå¼ã¶ã¨ãPerlã¤ã³ã¿ã¼ããªã¿ã¯<code>PERL5LIB</code>ã«ãªã¹ãããã¦ãããã£ã¬ã¯ããªãé çªã«ã<code>Demo/StringUtils.pm</code>ã¨ãããã¡ã¤ã«ãæ¢ãã¾ããã¢ã¸ã¥ã¼ã«ããã¼ããããããçªç¶ã«ãµãã«ã¼ãã³ã¨å¤æ°ãã¡ã¤ã³ã¹ã¯ãªããã«å®ç¾©ããã¾ãããã®ä¾ã®ã¹ã¯ãªããã<code>main.pl</code>ã¨å¼ã³ã¾ããããç¶ãã¦èªãã§ããã:</p> +<p>Perlã¢ã¸ã¥ã¼ã«ãä½ããã¦ã<code>perl</code>ããããã©ãã«ããããç¥ã£ã¦ããã°ãçµè¾¼ã®<code>require</code>é¢æ°ã使ã£ã¦æ¢ããPerlã®ã¹ã¯ãªããä¸ã§å®è¡ãããã¨ãã§ãã¾ããä¾ãã°ã<code>require Demo::StringUtils</code>ãå¼ã¶ã¨ãPerlã¤ã³ã¿ã¼ããªã¿ã¯<code>PERL5LIB</code>ã«ãªã¹ãããã¦ãããã£ã¬ã¯ããªãé çªã«ã <code>Demo/StringUtils.pm</code>ã¨ãããã¡ã¤ã«ãæ¢ãã¾ããã¢ã¸ã¥ã¼ã«ããã¼ããããããçªç¶ã«ãµãã«ã¼ãã³ã¨å¤æ°ãã¡ã¤ã³ã¹ã¯ãªããã«å®ç¾©ããã¾ãããã®ä¾ã®ã¹ã¯ãªããã<code>main.pl</code>ã¨å¼ã³ã¾ããããç¶ãã¦èªãã§ããã:</p> <pre class="perl prettyprint"> use strict; @@ -1678,7 +1676,7 @@ </ol> <p class="original">Because of this, in practice you will find that most "packages" and "modules" produced by reliable third parties <em>can</em> be regarded and referred to interchangeably. However, it is important that you do not take this for granted, because one day you <em>will</em> meet code produced by a madman.</p> -<p>ããã«ãã, ä¿¡é ¼ã§ãããµã¼ããã¼ãã£ã«ä½ããããã»ã¨ãã©ã®"packages"ã¨"modules"ãè¦ã¤ãããã¨ãã§ããç¸äºã«é¢ä¿ãåç §ãã<em>ãã</em>ããããããããå½ããåã¨æããªããã¨ã¯éè¦ã§ãããã¤ãã常è»ãé¸ãã人ãä½ã£ãã³ã¼ãã«åºä¼ã<em>ã§ããã</em>ã</p> +<p>ããã«ãã, ä¿¡é ¼ã§ãããµã¼ããã¼ãã£ã«ä½ããããã»ã¨ãã©ã®"ããã±ã¼ã¸"ã¨"ã¢ã¸ã¥ã¼ã«"ãè¦ã¤ãããã¨ãã§ããç¸äºã«é¢ä¿ãåç §ãããã¨ã<em>ã§ãã¾ã</em>ããããããããå½ããåã¨æããªããã¨ã¯éè¦ã§ãããã¤ãã常è»ãé¸ãã人ãä½ã£ãã³ã¼ãã«åºä¼ã<em>ã§ããã</em>ã</p> <h2 class="original">Object-oriented Perl</h2> <h2>ãªãã¸ã§ã¯ãæåPerl</h2> @@ -1747,7 +1745,7 @@ </pre> <p class="original">Note: literally any reference can be blessed into any class. It's up to you to ensure that (1) the referent can actually be used as an instance of this class and (2) that the class in question exists and has been loaded.</p> -<p>注æ: æåéããã©ã®ãããªãªãã¡ã¬ã³ã¹ããã©ã®ãããªã¯ã©ã¹ã«ã§ãblessãããã¾ãã(1)ãªãã¡ã¬ã³ã¹ãå®éã«ãã®ã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹ã¨ãã¦ä½¿ããã¦ãããã¨ã(2)åé¡ã®ã¯ã©ã¹ãåå¨ãããã¼ãããã¦ããããä¿è¨¼ããã®ã¯ããªã次第ã§ãã</p> +<p>注æ: æåéããã©ã®ãããªãªãã¡ã¬ã³ã¹ããã©ã®ãããªã¯ã©ã¹ã«ã§ãblessãããã¨ãã§ãã¾ãã(1)ãªãã¡ã¬ã³ã¹ãå®éã«ãã®ã¯ã©ã¹ã®ã¤ã³ã¹ã¿ã³ã¹ã¨ãã¦ä½¿ããã¦ãããã¨ã(2)åé¡ã®ã¯ã©ã¹ãåå¨ãããã¼ãããã¦ããããä¿è¨¼ããã®ã¯ããªã次第ã§ãã</p> <p class="original">You can still work with the original hash in the usual way:</p> <p>ã¾ã ãé常ã®ããæ¹ã§ãªãªã¸ãã«ã®ããã·ã¥ãæä½ã§ãã¾ã</p> @@ -1856,7 +1854,7 @@ </pre> <p class="original">A <code>BEGIN</code> block is always executed first. If you create multiple <code>BEGIN</code> blocks (don't), they are executed in order from top to bottom as the compiler encounters them. A <code>BEGIN</code> block always executes first even if it is placed halfway through a script (don't do this) or even at the end (or this).</p> -<p><code>BEGIN</code>ãããã¯ã¯å¸¸ã«ããï½é¬¼å®è¡ããã¾ããè¤æ°ã®<code>BEGIN</code>ãããã¯ãæ¸ãã¨(don't)ã ä¸ããé çªã«ã³ã³ãã¤ã©ããããã«åºä¼ãé çªã«å®è¡ããã¾ãã<code>BEGIN</code>ãããã¯ã¯å¸¸ã«æåã«å®è¡ããã¾ãããããBEGINãããã¯ãã¹ã¯ãªããã®éä¸(ãããªãã¨ã¯ããªãã§ãã ãã)ããæå¾(or this)ã«æ¸ããã¦ããããã¦ãããã</p> +<p><code>BEGIN</code>ãããã¯ã¯å¸¸ã«æåã«å®è¡ããã¾ããè¤æ°ã®<code>BEGIN</code>ãããã¯ãæ¸ãã¨(don't)ã ä¸ããé çªã«ã³ã³ãã¤ã©ããããã«åºä¼ãé çªã«å®è¡ããã¾ãã<code>BEGIN</code>ãããã¯ã¯å¸¸ã«æåã«å®è¡ããã¾ãããããBEGINãããã¯ãã¹ã¯ãªããã®éä¸(ãããªãã¨ã¯ããªãã§ãã ãã)ããæå¾(or this)ã«æ¸ããã¦ããããã¦ãããã</p> <p class="original">Because they are executed at compilation time, a <code>BEGIN</code> block placed inside a conditional block will <em>still</em> be executed first, even if the conditional evaluates to false and despite the fact that the conditional <em>has not been evaluated at all yet</em> and in fact <em>may never be evaluated</em>. <strong>Do not put <code>BEGIN</code> blocks in conditionals!</strong> If you want to do something conditionally at compile time, you need to put the conditional <em>inside</em> the <code>BEGIN</code> block:</p> <p>ã³ã³ãã¤ã«æã«å®è¡ãããã®ã§ã<code>BEGIN</code>ãããã¯ãæ¡ä»¶ãããã¯ã®ä¸ã«ãã£ã¦ãã<em>ã¾ã </em>æåã«å®è¡ããã¾ãããã¨ããæ¡ä»¶ã®è©ä¾¡ãå½ã§ãããæ¡ä»¶ã<em>ã¾ã ã¾ã£ããè©ä¾¡ããã¦ããªã</em>ã«ãããããããå®éã«ã¯ã<em>è©ä¾¡ããããã¨ããªã</em>ã¨ãã¦ãã§ãã<strong><code>BEGIN</code>ãããã¯ãæ¡ä»¶ã®ä¸ã«ç½®ãã¦ã¯è¡ãã¾ãã!</strong> ã³ã³ãã¤ã«æã«ä½ãããã®æ¡ä»¶ä»ãã®ãã¨ãããããã°ã<code>BEGIN</code>ãããã¯ã®<em>ä¸ã«</em>æ¡ä»¶æãç½®ããªããã°ãªãã¾ãã:</p> <pre class="perl prettyprint"> @@ -1961,7 +1959,7 @@ <p><code>import()</code>ãããçµæã¨ãã¦ã<code>Caterpillar::crawl()</code>ã®ãããªã¡ã½ããã<code>crawl()</code>ã®ããã«ã修飾ãªãã«å©ç¨å¯è½ã«ãªãã¾ããããã¯ãã¿ã¤ãæ°ã®ç¯ç´ã«ãªãã¾ãã(注æ: <code>@EXPORT_OK</code>ã®ã³ã³ã»ããã«ãããããã å ¨ã¦ã®ã¡ã½ããã¯ãä¸ã§è¦ãããã«ã"longhand"ã§å¼ã¶ãã¨ãåºæ¥ã¾ãã Perlã«ã¯ãã©ã¤ãã¼ãã¡ã½ããã¯ããã¾ãããéä¾ã1ã¤ã2ã¤ã®ã¢ã³ãã¼ã¹ã³ã¢ããå§ã¾ãååãä»ããããã¡ã½ããã¯ãã©ã¤ãã¼ããæå³ãã¾ãã</p> <p class="original">Note how, again, we are back in a situation where without other clues it might not be easy to tell where <code>crawl()</code> was originally defined. The moral of this story is twofold:</p> -<p>å度注æãã¦ããã¨ãä»ã®ãã®ãªãã·ãã¥ã¨ã¼ã·ã§ã³ã«æ»ãã¨ã<code>crawl()</code>ãå ã ã©ãã§å®ç¾©ããã¦ããã®ããæããã®ã¯ç°¡åã§ã¯ããã¾ããããã®è©±ã®æè¨ã¯2ã¤ããã¾ã:</p> +<p>å度注æãã¦ããã¨ã"longhand"ã§ä½¿ã£ã¦ããªããããªå ´åã<code>crawl()</code>ãå ã ã©ãã§å®ç¾©ããã¦ããã®ããæããã®ã¯ç°¡åã§ã¯ããã¾ããããã®è©±ã®æè¨ã¯2ã¤ããã¾ã:</p> <ol> <li> @@ -1970,7 +1968,7 @@ </li> <li> <p class="original">When <code>use</code>ing a module which makes use of Exporter, always explicitly name the subroutines you want to <code>import()</code>. If you don't want to <code>import()</code> any subroutines and wish to refer to them longhand, you must supply an explicit empty list: <code>use Caterpillar ()</code>.</p> - <p>ã¢ã¸ã¥ã¼ã«ã<code>use</code>ããã¨ã常ã«æ示çã«<code>import()</code>ããããµãã«ã¼ãã³ã®ååæ¸ãã¾ããä½ã®ãµãã«ã¼ãã³ã<code>import()</code>ããããªããlonghandã§åç §ãããã®ãªããããã®ãªã¹ããæä¾ããªããã°ããã¾ããã: <code>use Caterpillar ()</code>.</p></li> + <p>ã¢ã¸ã¥ã¼ã«ã<code>use</code>ããã¨ã常ã«æ示çã«<code>import()</code>ããããµãã«ã¼ãã³ã®ååæ¸ãã¾ããä½ã®ãµãã«ã¼ãã³ã<code>import()</code>ããããªããlonghandã§åç §ãããã®ãªãã空ã®ãªã¹ããæä¾ããªããã°ããã¾ãã: <code>use Caterpillar ()</code>.</p></li> </ol> <h2 class="original">Miscellaneous notes</h2> @@ -1987,7 +1985,7 @@ use Account qw{create open close suspend delete}; </pre> <p class="original">There are <a href="http://perldoc.perl.org/perlop.html#Quote-and-Quote-like-Operators">many other quote-like operators</a>.</p> - <p><a href="http://perldoc.perl.org/perlop.html#Quote-and-Quote-like-Operators">å¤ãã®ä»ã®ã¯ã©ã¼ãã©ã¤ã¯ãªãªãã¬ã¼ã¿ãããã¾ã</a>ã</p> + <p><a href="http://perldoc.perl.org/perlop.html#Quote-and-Quote-like-Operators">å¤ãã®ä»ã®ã¯ã©ã¼ãã©ã¤ã¯ãªãªãã¬ã¼ã¿</a>ãããã¾ãã</p> </li> <li> <p class="original">In <code>=~ m//</code> and <code>=~ s///</code> operations, you can use braces instead of slashes as the regex delimiters. This is quite useful if your regex contains a lot of slashes, which would otherwise need escaping with backslashes. For example, <code>=~ m{///}</code> matches three literal forward slashes, and <code>=~ s{^https?://}{}</code> removes the protocol part of a URL.</p>