[perldocjp-cvs 1533] CVS update: docs/articles/qntm.org/files/perl

Back to archive index

ktats****@users***** ktats****@users*****
2012年 9月 2日 (日) 01:47:32 JST


Index: docs/articles/qntm.org/files/perl/perl.html
diff -u docs/articles/qntm.org/files/perl/perl.html:1.9 docs/articles/qntm.org/files/perl/perl.html:1.10
--- docs/articles/qntm.org/files/perl/perl.html:1.9	Sun Sep  2 01:35:41 2012
+++ docs/articles/qntm.org/files/perl/perl.html	Sun Sep  2 01:47:32 2012
@@ -518,8 +518,8 @@
 print @array;              # "AlphaBetaGoo";
 print $scalar, @array, 98; # "-X-AlphaBetaGoo98";
 </pre>
-<p class="original">You can force any expression to be evaluated in scalar context using the <code>scalar</code> built-in function. In fact, this is why we use <code>scalar</code> to retrieve the length of an array.</p>
-<p>どのような式も<code>scalar</code>組込関数を使えばスカラコンテキストで強制的に評価することが出来ます。このことが、なぜ<code>scalar</code>を配列の長さを取るのに使うのかの理由です。</p>
+<p class="original">You can force any expression to be evaluated in scalar context using the <code><a href="http://perldoc.perl.org/functions/scalar.html">scalar</a></code> built-in function. In fact, this is why we use <code>scalar</code> to retrieve the length of an array.</p>
+<p>どのような式も<code>scalar</code>組込関数を使えばスカラコンテキストで強制的に評価することが出来ます。このことが、なぜ<code><a href="http://perldoc.perl.org/functions/scalar.html">scalar</a></code>を配列の長さを取るのに使うのかの理由です。</p>
 
 <p class=original>You are not bound by law or syntax to return a scalar value when a subroutine is evaluated in scalar context, nor to return a list value in list context. As seen above, Perl is perfectly capable of fudging the result for you.</p>
 <p>サブルーチンがスカラコンテキストで評価されるときにスカラを返すような法律やシンタックスにはあなたは縛られていませんし、また、リストコンテキストでリストを返すこともまた同じです。上で見たように、Perlは完全にあなたのために結果を作ることができます。</p>
@@ -993,36 +993,36 @@
 print @stack; # "FredEileenDeniseCharlie"
 </pre>
 
-<p class=original><code>pop</code> extracts and returns the final element of the array. This can be thought of as the top of the stack:</p>
-<p><code>pop</code> は配列の最後の要素を引き出して返します。スタックの上として考えられます:</p>
+<p class=original><code><a href="http://perldoc.perl.org/functions/pop.html">pop</a></code> extracts and returns the final element of the array. This can be thought of as the top of the stack:</p>
+<p><code><a href="http://perldoc.perl.org/functions/pop.html">pop</a></code> は配列の最後の要素を引き出して返します。スタックの上として考えられます:</p>
 <pre class="perl prettyprint">
 print pop @stack; # "Charlie"
 print @stack;     # "FredEileenDenise"
 </pre>
 
-<p class=original><code>push</code> appends extra elements to the end of the array:</p>
-<p><code>push</code> は追加の要素を配列の最後に付加します:</p>
+<p class=original><code><a href="http://perldoc.perl.org/functions/push.html">push</a></code> appends extra elements to the end of the array:</p>
+<p><code><a href="http://perldoc.perl.org/functions/push.html">push</a></code> は追加の要素を配列の最後に付加します:</p>
 <pre class="perl prettyprint">
 push @stack, "Bob", "Alice";
 print @stack; # "FredEileenDeniseBobAlice"
 </pre>
 
-<p class=original><code>shift</code> extracts and returns the first element of the array:</p>
-<p><code>shift</code> は配列の最初の要素を引き出して返します:</p>
+<p class=original><code><a href="http://perldoc.perl.org/functions/shift.html">shift</a></code> extracts and returns the first element of the array:</p>
+<p><code><a href="http://perldoc.perl.org/functions/shift.html">shift</a></code> は配列の最初の要素を引き出して返します:</p>
 <pre class="perl prettyprint">
 print shift @stack; # "Fred"
 print @stack;       # "EileenDeniseBobAlice"
 </pre>
 
-<p class=original><code>unshift</code> inserts new elements at the beginning of the array:</p>
-<p><code>unshift</code> 配列の最初に新しい要素を挿入します:</p>
+<p class=original><code><a href="http://perldoc.perl.org/functions/unshift.html">unshift</a></code> inserts new elements at the beginning of the array:</p>
+<p><code><a href="http://perldoc.perl.org/functions/unshift.html">unshift</a></code> 配列の最初に新しい要素を挿入します:</p>
 <pre class="perl prettyprint">
 unshift @stack, "Hank", "Grace";
 print @stack; # "HankGraceEileenDeniseBobAlice"
 </pre>
 
-<p class=original><code>pop</code>, <code>push</code>, <code>shift</code> and <code>unshift</code> are all special cases of <code>splice</code>. <code>splice</code> removes and returns an array slice, replacing it with a different array slice:</p>
-<p><code>pop</code>、<code>push</code>、 <code>shift</code>、<code>unshift</code> は、全て、<code>splice</code>の特別なケースです。<code>splice</code> は、配列のスライスを削除して、返します。別の配列スライスでそれを置き換えます:</p>
+<p class=original><code>pop</code>, <code>push</code>, <code>shift</code> and <code>unshift</code> are all special cases of <code><a href="http://perldoc.perl.org/functions/splice.html">splice</a></code>. <code>splice</code> removes and returns an array slice, replacing it with a different array slice:</p>
+<p><code>pop</code>、<code>push</code>、 <code>shift</code>、<code>unshift</code> は、全て、<code><a href="http://perldoc.perl.org/functions/splice.html">splice</a></code>の特別なケースです。<code>splice</code> は、配列のスライスを削除して、返します。別の配列スライスでそれを置き換えます:</p>
 <pre class="perl prettyprint">
 print splice(@stack, 1, 4, "&lt;&lt;&lt;", "&gt;&gt;&gt;"); # "GraceEileenDeniseBob"
 print @stack;                             # "Hank&lt;&lt;&lt;&gt;&gt;&gt;Alice"
@@ -1081,7 +1081,7 @@
 <p class=original><code>grep</code> and <code>map</code> may be combined to form <i><a href="https://en.wikipedia.org/wiki/List_comprehension">list comprehensions</a></i>, an exceptionally powerful feature conspicuously absent from many other programming languages.</p>
 <p><code>grep</code> と <code>map</code> は、<i><a href="https://en.wikipedia.org/wiki/List_comprehension">リスト包含</a></i>の形に含まれます。他の多くのプログラミング言語に目立って欠けている、例外的に強力な機能です。</p>
 
-<p class=original>By default, the <code>sort</code> function returns the input array, sorted into lexical (alphabetical) order:</p>
+<p class=original>By default, the <code><a href="http://perldoc.perl.org/functions/sort.html">sort</a></code> function returns the input array, sorted into lexical (alphabetical) order:</p>
 <p>デフォルトでは、<code>sort</code>関数は入力された配列を文字順(アルファベット順)に並びかえます:</p>
 
 <pre class="perl prettyprint">
@@ -1304,8 +1304,8 @@
 <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 class="original">You can exit from a Perl script with the return code of your choice (from 0 to 255) using <code>exit</code>.</p>
-<p>Perlから終了する際に、<code>exit</code>を使って(0から255までの)好きなリターンコードを返せます。</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 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>



perldocjp-cvs メーリングリストの案内
Back to archive index