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

アーカイブの一覧に戻る

ktats****@users***** ktats****@users*****
2012年 9月 8日 (土) 22:19:31 JST


Index: docs/articles/qntm.org/files/perl/perl.html
diff -u docs/articles/qntm.org/files/perl/perl.html:1.12 docs/articles/qntm.org/files/perl/perl.html:1.13
--- docs/articles/qntm.org/files/perl/perl.html:1.12	Mon Sep  3 00:32:56 2012
+++ docs/articles/qntm.org/files/perl/perl.html	Sat Sep  8 22:19:30 2012
@@ -1,4 +1,4 @@
-r<!Doctype html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!Doctype html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 <html xmlns="http://www.w3.org/1999/xhtml">
 	<head>
 		<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=utf-8" />
@@ -28,11 +28,11 @@
 
 <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 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 class=original>This document is intended to be informative, not evangelical. It is aimed at people who, like me:</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>
+<ul class="original">
 	<li>dislike the official Perl documentation at <a href="http://perl.org">http://perl.org/</a> for being intensely technical and giving far too much space to very unusual edge cases</li>
 	<li>learn new programming languages most quickly by "axiom and example"</li>
 	<li>wish Larry Wall would get to the point</li>
@@ -48,13 +48,13 @@
 	<li>仕事を終えるために何が必要かということ以上のことをPerlについて気にしない</li>
 </ul>
 
-<p class=original>This document is intended to be as short as possible, but no shorter.</p>
+<p class="original">This document is intended to be as short as possible, but no shorter.</p>
 
 <p>このドキュメントは可能な限り短くしていますが、足らないことのないようにしています。</p>
 
-<h2 class=original>Preliminary notes</h2>
+<h2 class="original">Preliminary notes</h2>
 <h2>前書き</h2>
-<ul class=original>
+<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>以下のことを、このドキュメント内のほとんどすべての宣言文で言うことが出来ます: "これは、厳格な意味での、真実ではありません; 状況は実際にはもっと複雑です"。もし深刻な嘘を見つけたら、指摘してください。ですが、私には子どもにつく重要な嘘をそのままにしておく権利があります。</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>
@@ -65,9 +65,9 @@
 
 <h2>Hello world</h2>
 
-<p class=original>A Perl <i>script</i> is a text file with the extension <code>.pl</code>.</p>
+<p class="original">A Perl <i>script</i> is a text file with the extension <code>.pl</code>.</p>
 <p>Perl<i>スクリプト</i>は<code>.pl</code>という拡張子のテキストファイルです。</p>
-<p class=original>Here's the full text of <code>helloworld.pl</code>:</p>
+<p class="original">Here's the full text of <code>helloworld.pl</code>:</p>
 <p><code>helloworld.pl</code>は以下のようになります:</p>
 <pre class="perl prettyprint">
 use strict;
@@ -75,13 +75,13 @@
 
 print "Hello world";
 </pre>
-<p class=original>Perl scripts are interpreted by the Perl interpreter, <code>perl</code> or <code>perl.exe</code>:</p>
+<p class="original">Perl scripts are interpreted by the Perl interpreter, <code>perl</code> or <code>perl.exe</code>:</p>
 <p>PerlスクリプトはPerlインタープリタ、<code>perl</code>か<code>perl.exe</code>で解釈されます:</p>
 
 <pre class="bash">
 perl helloworld.pl [arg0 [arg1 [arg2 ...]]]
 </pre>
-<p class=original>A few immediate notes. Perl's syntax is highly permissive and it will allow you to do things which result in ambiguous-looking statements with unpredictable behaviour. There's no point in me explaining what these behaviours are, because you want to avoid them. The way to avoid them is to put <code>use strict; use warnings;</code> at the very top of every Perl script or module that you create. Statements of the form <code>use foo;</code> are <i>pragmas</i>. A pragma is a signal to <code>perl.exe</code>, which takes effect when initial syntactic validation is being performed, before the program starts running. These lines have no effect when the interpreter encounters them at run time.</p>
+<p class="original">A few immediate notes. Perl's syntax is highly permissive and it will allow you to do things which result in ambiguous-looking statements with unpredictable behaviour. There's no point in me explaining what these behaviours are, because you want to avoid them. The way to avoid them is to put <code>use strict; use warnings;</code> at the very top of every Perl script or module that you create. Statements of the form <code>use foo;</code> are <i>pragmas</i>. A pragma is a signal to <code>perl.exe</code>, which takes effect when initial syntactic validation is being performed, before the program starts running. These lines have no effect when the interpreter encounters them at run time.</p>
 
 <p>当面のメモとしていくつか。Perlのシンタックスはかなり寛大なので、結果として振る舞いを予測できない曖昧に見えるようなセンテンスを書くことをあなたに許します。私にとっては意味がないので、それらの振る舞いに関して説明しません。なぜなら、あなたはそれらを避けたいでしょうから。それらを避ける方法は、<code>use strict;use warnings;</code>を、あなたの作る全てのperlスクリプトやモジュールの上の方に置くことです。<code>use</code> fooのステートメントは<i>プラグマ</i>です。プラグマは<code>Perl.exe</code>へのシグナルです。プログラムが走り始める前に、最初のシンタックスチェックをする方法を変更します。これらの行はコンパイル時に影響し、実行時にはインタープリタが出くわしても影響を受けません。</p>
 <p class="original">The symbol <code>#</code> begins a comment. A comment lasts until the end of the line. Perl has no block comment syntax.</p>
@@ -91,17 +91,17 @@
 
 <h2>変数</h2>
 
-<p class=original>Perl variables come in three types: <i>scalars</i>, <i>arrays</i> and <i>hashes</i>. Each type has its own <i>sigil</i>: <code>$</code>, <code>@</code> and <code>%</code> respectively. Variables are declared using <code>my</code>, and remain in scope until the end of the enclosing block or file.</p>
+<p class="original">Perl variables come in three types: <i>scalars</i>, <i>arrays</i> and <i>hashes</i>. Each type has its own <i>sigil</i>: <code>$</code>, <code>@</code> and <code>%</code> respectively. Variables are declared using <code>my</code>, and remain in scope until the end of the enclosing block or file.</p>
 
 <p>Perlの変数には次の3タイプあります: <i>スカラ</i>、<i>配列</i>、 <i>ハッシュ</i>です. それぞれのタイプには、自身の<i>シジル(sigil)</i>があります: それぞれ、<code>$</code>, <code>@</code> and <code>%</code>。 変数は<code>my</code>で宣言され、ブロックかfイルの最後までスコープ内に残ります。</p>
 
-<h3 class=original>Scalar variables</h3>
+<h3 class="original">Scalar variables</h3>
 
 <h3>スカラ変数</h3>
 
-<p class=original>A scalar variable can contain:</p>
+<p class="original">A scalar variable can contain:</p>
 <p>スカラ変数は以下のものを格納できます:</p>
-<ul class=original>
+<ul class="original">
 	<li><code>undef</code> (corresponds to <code>None</code> in Python, <code>null</code> in PHP)</li>
 	<li>a number (Perl does not distinguish between an integer and a float)</li>
 	<li>a string</li>
@@ -133,10 +133,10 @@
 print $string; # "world"
 </pre>
 
-<p class=original>(References are coming up shortly.)</p>
+<p class="original">(References are coming up shortly.)</p>
 <p>(リファレンスは後で説明します)</p>
 
-<p class=original>String concatenation using the <code>.</code> operator (same as PHP):</p>
+<p class="original">String concatenation using the <code>.</code> operator (same as PHP):</p>
 <p>文字列の連結には<code>.</code>演算子を使います(PHPと同じ):</p>
 <pre class="perl prettyprint">
 print "Hello ".$string; # "Hello world"
@@ -144,7 +144,7 @@
 
 <h3 class="original">"Booleans"</h3>
 <h3>真偽値</h3>
-<p class=original><strong>Perl has no boolean data type.</strong> A scalar in an <code>if</code> statement evaluates to boolean "false" if and only if it is one of the following:</p>
+<p class="original"><strong>Perl has no boolean data type.</strong> A scalar in an <code>if</code> statement evaluates to boolean "false" if and only if it is one of the following:</p>
 
 <p><strong>Perlにはブーリアンのデータ型はありません。</strong> <code>if</code>ステートメントではスカラは、以下のいずれかの場合にのみ"偽"として評価されます:</p>
 
@@ -155,13 +155,13 @@
 	<li>string <code>"0"</code>.</li>
 </ul>
 
-<p class=original>The Perl documentation <em>repeatedly</em> claims that functions return "true" or "false" values in certain situations. In practice, when a function is claimed to return "true" it usually returns <code>1</code>, and when it is claimed to return false it usually returns the empty string, <code>""</code>.</p>
+<p class="original">The Perl documentation <em>repeatedly</em> claims that functions return "true" or "false" values in certain situations. In practice, when a function is claimed to return "true" it usually returns <code>1</code>, and when it is claimed to return false it usually returns the empty string, <code>""</code>.</p>
 
 <p>Perlのドキュメントでは、<em>繰り返し</em>、特定の状況で"真"か"偽"の値を関数が返すように主張しています。実際には、関数が真を返すように主張しているときは、普通<code>1</code>を返します。また、関数が偽を返すように主張しているなら、普通は空文字<code>""</code>を返します。</p>
 
-<h3 class=original>Weak typing</h3>
+<h3 class="original">Weak typing</h3>
 <h3>弱い型付け</h3>
-<p class=original><strong>It is impossible to determine whether a scalar contains a "number" or a "string".</strong> More precisely, it should never be necessary to do this. Whether a scalar behaves like a number or a string depends on the operator with which it is used. When used as a string, a scalar will behave like a string. When used as a number, a scalar will behave like a number (raising a warning if this isn't possible):</p>
+<p class="original"><strong>It is impossible to determine whether a scalar contains a "number" or a "string".</strong> More precisely, it should never be necessary to do this. Whether a scalar behaves like a number or a string depends on the operator with which it is used. When used as a string, a scalar will behave like a string. When used as a number, a scalar will behave like a number (raising a warning if this isn't possible):</p>
 <p><strong>スカラーに"数字"か"変数"のいずれかが入っているのかを判断することはできません。</strong> より正確には、そんなことは見当違いです。Perlはその点で弱い型付けです。 スカラが数字か文字のどちらかのように振舞うかは、使われる演算子によります。文字列として使えば、スカラは文字列のようにふるまいます。数字として使えば、スカラは数字のようにふるまいます(また、そうすることが出来なければ、警告を発します):</p>
 
 <pre class="perl prettyprint">
@@ -176,7 +176,7 @@
 # The classic error
 print "yes" == "no"; # "1" with two warnings; both values evaluate to 0 when used as numbers
 </pre>
-<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 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 original">
@@ -186,13 +186,13 @@
 
 <pre class="perl prettyprint">
 # 数字用の演算子:  &lt;,  &gt;, &lt;=, &gt;=, ==, !=, &lt;=&gt;
-# 文字用の演算子:     <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>
+# 文字用の演算子:     <a href="http://perldoc.jp/docs/perl/perlop.pod#Equality32Operators">lt, gt, le, ge, eq, ne, cmp</a>, <a href="http://perldoc.jp/docs/perl/perlop.pod#Multiplicative32Operators">.</a>, <a href="http://perldoc.jp/docs/perl/perlop.pod#Multiplicative32Operators">x</a>
 </pre>
 
-<h3 class=original>Array variables</h3>
+<h3 class="original">Array variables</h3>
 <h3>配列変数</h3>
 
-<p class=original>An array variable is a list of scalars indexed by integers beginning at 0. In Python this is known as a <i>list</i>, and in PHP this is known as an <i>array</i>. An array is declared using a parenthesised list of scalars:</p>
+<p class="original">An array variable is a list of scalars indexed by integers beginning at 0. In Python this is known as a <i>list</i>, and in PHP this is known as an <i>array</i>. An array is declared using a parenthesised list of scalars:</p>
 <p>配列変数は整数の0で始まるはじまるインデックスされたスカラです。Pythonでは、<i>list</i>で、PHPでは、<i>array</i>です。配列は丸括弧を使って宣言される、配列のリストです。</p>
 
 <pre class="perl original">
@@ -217,7 +217,7 @@
 );
 </pre>
 
-<p class=original>You have to use a dollar sign to access a value from an array, because the value being <em>retrieved</em> is not an array but a scalar:</p>
+<p class="original">You have to use a dollar sign to access a value from an array, because the value being <em>retrieved</em> is not an array but a scalar:</p>
 
 <p>配列から値にアクセスするときにはドル記号を使わなければいけません。<em>取られる</em>値は配列ではなく、スカラだからです:</p>
 
@@ -231,7 +231,7 @@
 print $array[6]; # raises warning, returns undef, prints ""
 </pre>
 
-<p class=original>You can use negative indices to retrieve entries starting from the end and working backwards:</p>
+<p class="original">You can use negative indices to retrieve entries starting from the end and working backwards:</p>
 <p>負のインデックスを、後ろから値を取るのに使えます。逆向きになります:</p>
 
 <pre class="perl prettyprint">
@@ -244,11 +244,11 @@
 print $array[-7]; # raises warning, returns undef, prints ""
 </pre>
 
-<p class=original>There is no collision between a scalar <code>$var</code> and an array <code>@var</code> containing a scalar entry <code>$var[0]</code>. There may, however, be reader confusion, so avoid this.</p>
+<p class="original">There is no collision between a scalar <code>$var</code> and an array <code>@var</code> containing a scalar entry <code>$var[0]</code>. There may, however, be reader confusion, so avoid this.</p>
 
 <p>スカラ<code>$array</code>とスカラのエントリ<code>$var[0]</code>を持つ配列<code>@var</code>は衝突しません。 とはいえ、コードを読む人が混乱しますので、同じ名前を付けるのは避けましょう。</p>
 
-<p class=original>To get an array's length:</p>
+<p class="original">To get an array's length:</p>
 <p>配列の長さを得るには:</p>
 
 <pre class="perl prettyprint">
@@ -256,17 +256,17 @@
 print "The last populated index is ".$#array;       # "The last populated index is 5"
 </pre>
 
-<p class=original>The arguments with which the original Perl script was invoked are stored in the <a href="http://perldoc.perl.org/perlvar.html">built-in array variable</a> <code>@ARGV</code>.</p>
-<p>オリジナルのPerlスクリプトの実行時の引数は、<a href="http://perldoc.perl.org/perlvar.html">組込の配列変数</a><code>@ARGV</code>に入ります。</p>
+<p class="original">The arguments with which the original Perl script was invoked are stored in the <a href="http://perldoc.perl.org/perlvar.html">built-in array variable</a> <code>@ARGV</code>.</p>
+<p>オリジナルのPerlスクリプトの実行時の引数は、<a href="http://perldoc.jp/docs/perl/perlvar.pod">組込の配列変数</a><code>@ARGV</code>に入ります。</p>
 
-<p class=original>Variables can be interpolated into strings:</p>
+<p class="original">Variables can be interpolated into strings:</p>
 <p>変数を文字列の間に入れることができます:</p>
 <pre class="perl prettyprint">
 print "Hello $string"; # "Hello world"
 print "@array";        # "print these strings out for me"
 </pre>
 
-<p class=original><strong>Caution.</strong> One day you will put somebody's email address inside a string, <code>"jeff****@gmail*****"</code>. This will cause Perl to look for an array variable called <code>@gmail</code> to interpolate into the string, and not find it, resulting in a runtime error. Interpolation can be prevented in two ways: by backslash-escaping the sigil, or by using single quotes instead of double quotes.</p>
+<p class="original"><strong>Caution.</strong> One day you will put somebody's email address inside a string, <code>"jeff****@gmail*****"</code>. This will cause Perl to look for an array variable called <code>@gmail</code> to interpolate into the string, and not find it, resulting in a runtime error. Interpolation can be prevented in two ways: by backslash-escaping the sigil, or by using single quotes instead of double quotes.</p>
 <p><strong>注意。</strong> ある日、誰かのメールアドレス、<code>"jeff****@gmail*****"</code>を文字列に入れたとします。 これは、Perlに<code>@gmail</code>という配列変数を探させ、文字列の間に入れようとします。それが見つからなければ、エラーになります。変数の展開を防ぐには2つの方法があります:シジルをエスケープする。まてゃあ、ダブルクォートの代わりにシングルクォートを使う。</p>
 
 <pre class="perl prettyprint">
@@ -276,10 +276,10 @@
 print '@array';         # "@array"
 </pre>
 
-<h3 class=original>Hash variables</h3>
+<h3 class="original">Hash variables</h3>
 <h3>ハッシュ変数</h3>
 
-<p class=original>A hash variable is a list of scalars indexed by strings. In Python this is known as a <i>dictionary</i>, and in PHP it is known as an <i>array</i>.</p>
+<p class="original">A hash variable is a list of scalars indexed by strings. In Python this is known as a <i>dictionary</i>, and in PHP it is known as an <i>array</i>.</p>
 <p>ハッシュ変数は文字でインデックスされた素からのリストです。Pythonでは<i>dictionary</i>、PHPでは<i>array</i>になります。</p>
 
 <pre class="perl prettyprint">
@@ -290,10 +290,10 @@
 );
 </pre>
 
-<p class=original>Notice how similar this declaration is to an array declaration. In fact, the double arrow symbol <code>=&gt;</code> is called a "fat comma", because it is just a synonym for the comma separator. A hash is declared using a list with an even number of elements, where the even-numbered elements (0, 2, ...) are all taken as strings.</p>
+<p class="original">Notice how similar this declaration is to an array declaration. In fact, the double arrow symbol <code>=&gt;</code> is called a "fat comma", because it is just a synonym for the comma separator. A hash is declared using a list with an even number of elements, where the even-numbered elements (0, 2, ...) are all taken as strings.</p>
 <p>この宣言は配列変数の宣言にとても似ていることに注意してください。実際に、二重矢印記号<code>=&gt;</code>は、"ファットカンマ"と呼ばれます。というのも、これは、カンマセパレータのまさにシノニムだからです。ハッシュは偶数の数のリストを使って宣言されます。偶数の要素(0, 2, ...)は全て文字列として取られます。</p>
 
-<p class=original>Once again, you have to use a dollar sign to access a value from a hash, because the value being <em>retrieved</em> is not a hash but a scalar:</p>
+<p class="original">Once again, you have to use a dollar sign to access a value from a hash, because the value being <em>retrieved</em> is not a hash but a scalar:</p>
 <p>またまた、ハッシュから値にアクセスするには、ドル記号を使わなければいけません。<em>取られる</em>値はハッシュではなく、スカラだからです:</p>
 
 <pre class="perl original">
@@ -310,18 +310,18 @@
 print $scientists{"Dyson"};    # 警告が起きます。undefが戻り、""が出力されます
 </pre>
 
-<p class=original>Note the braces used here. Again, there is no collision between a scalar <code>$var</code> and a hash <code>%var</code> containing a scalar entry <code>$var{"foo"}</code>.</p>
+<p class="original">Note the braces used here. Again, there is no collision between a scalar <code>$var</code> and a hash <code>%var</code> containing a scalar entry <code>$var{"foo"}</code>.</p>
 
 <p>ブレースが使われていることに注意してください。配列のときと同じですが、スカラの<code>$var</code>とスカラのエントリ<code>$var{"foo"}</code>が入っているハッシュの<code>%var</code>は衝突しません。</p>
 
-<p class=original>You can convert a hash straight to an array with twice as many entries, alternating between key and value (and the reverse is equally easy):</p>
+<p class="original">You can convert a hash straight to an array with twice as many entries, alternating between key and value (and the reverse is equally easy):</p>
 <p>エントリを2倍にしてハッシュを配列に直接変換することや、キーと値を変更することができます(その逆もまた簡単です):</p>
 
 <pre class="perl prettyprint">
 my @scientists = %scientists;
 </pre>
 
-<p class=original>However, unlike an array, the keys of a hash have <em>no underlying order</em>. They will be returned in whatever order is more efficient. So, notice the rearranged <em>order</em> but preserved <em>pairs</em> in the resulting array:</p>
+<p class="original">However, unlike an array, the keys of a hash have <em>no underlying order</em>. They will be returned in whatever order is more efficient. So, notice the rearranged <em>order</em> but preserved <em>pairs</em> in the resulting array:</p>
 
 <p>ですが、配列とは違い、ハッシュのキーは<em>順番がありません</em>。より効率的な順番で返ってきます。そのため、整列され直された<em>順番</em>に気をつけてください。しかし、結果の配列の<em>ペア</em>は保持されます:</p>
 
@@ -329,7 +329,7 @@
 print "@scientists"; # something like "Einstein Albert Darwin Charles Newton Isaac"
 </pre>
 
-<p class=original>To recap, you have to use <strong>square brackets</strong> to retrieve a value from an array, but you have to use <strong>braces</strong> to retrieve a value from a hash. The square brackets are effectively a numerical operator and the braces are effectively a string operator. The fact that the <em>index</em> supplied is a number or a string is of absolutely no significance:</p>
+<p class="original">To recap, you have to use <strong>square brackets</strong> to retrieve a value from an array, but you have to use <strong>braces</strong> to retrieve a value from a hash. The square brackets are effectively a numerical operator and the braces are effectively a string operator. The fact that the <em>index</em> supplied is a number or a string is of absolutely no significance:</p>
 <p>要点をまとめると、配列から値を取り出すのには<strong>四角いブラケット</strong>を使わなければいけませんが、ハッシュから値を取り出すのは<strong>ブレース</strong>を使わなければいけません。提供される<em>インデックス</em>が数字であるか文字列であるということには、重要性はありません:</p>
 
 <pre class="perl prettyprint">
@@ -344,10 +344,10 @@
 print $data{"0"}; # "blue"
 </pre>
 
-<h3 class=original>Lists</h3>
+<h3 class="original">Lists</h3>
 <h3>リスト</h3>
 
-<p class=original>A <i>list</i> in Perl is a different thing again from either an array or a hash. You've just seen several lists:</p>
+<p class="original">A <i>list</i> in Perl is a different thing again from either an array or a hash. You've just seen several lists:</p>
 <p>Perlにおける<i>リスト</i>は配列やハッシュとは違うものです。既にいくつかのリストがありました:</p>
 
 <pre class="perl prettyprint">
@@ -367,9 +367,9 @@
 )
 </pre>
 
-<p class=original><strong>A list is not a variable.</strong> A list is an ephemeral <em>value</em> which can be <em>assigned</em> to an array or a hash variable. This is why the syntax for declaring array and hash variables is identical. There are many situations where the terms "list" and "array" can be used interchangeably, but there are equally many where lists and arrays display subtly different and extremely confusing behaviour.</p>
+<p class="original"><strong>A list is not a variable.</strong> A list is an ephemeral <em>value</em> which can be <em>assigned</em> to an array or a hash variable. This is why the syntax for declaring array and hash variables is identical. There are many situations where the terms "list" and "array" can be used interchangeably, but there are equally many where lists and arrays display subtly different and extremely confusing behaviour.</p>
 <p><strong>リストは変数ではありません。</strong>リストはその場限りの<em>値</em>で、配列やハッシュ変数に<em>割り当て</em>られます。このことは、配列とハッシュの変数の宣言のシンタックスがが一致していることの理由です。"リスト"と"配列"の用語が交換可能な状況は多くありますが、同様に、リストと配列がいくぶん違って見えるところもあり、その振る舞いに非常に混乱します。</p>
-<p class=original>Okay. Remember that <code>=&gt;</code> is just <code>,</code> in disguise and then look at this example:</p>
+<p class="original">Okay. Remember that <code>=&gt;</code> is just <code>,</code> in disguise and then look at this example:</p>
 <p>いいでしょう。 <code>=&gt;</code>は、ただの<code>,</code>であることを思い出し、返送させて、次の例を見てください:</p>
 
 <pre class="perl prettyprint">
@@ -377,14 +377,14 @@
 ("one" =&gt; 1, "three" =&gt; 3, "five" =&gt; 5)
 </pre>
 
-<p class=original>The use of <code>=&gt;</code> hints that one of these lists is an array declaration and the other is a hash declaration. But on their own, neither of them are declarations of anything. They are just lists. <em>Identical</em> lists. Also:</p>
+<p class="original">The use of <code>=&gt;</code> hints that one of these lists is an array declaration and the other is a hash declaration. But on their own, neither of them are declarations of anything. They are just lists. <em>Identical</em> lists. Also:</p>
 <p><code>=&gt;</code>の使い方が一方のリストが配列の宣言であることを示し、他方はハッシュの宣言であることを示しています。ですが、2つとも、それ自身、何の宣言でもありません。ただのリストです。<em>同一の</em>リストです。また:</p>
 
 <pre class="perl prettyprint">
 ()
 </pre>
 
-<p class=original>There aren't even hints here. This list could be used to declare an empty array or an empty hash and the <code>perl</code> interpreter clearly has no way of telling either way. Once you understand this odd aspect of Perl, you will also understand why the following fact must be true: <strong>List values cannot be nested.</strong> Try it:</p>
+<p class="original">There aren't even hints here. This list could be used to declare an empty array or an empty hash and the <code>perl</code> interpreter clearly has no way of telling either way. Once you understand this odd aspect of Perl, you will also understand why the following fact must be true: <strong>List values cannot be nested.</strong> Try it:</p>
 
 <p>なんのヒントも存在しません。このリストは空の配列として宣言されているのでしょうか、それとも、カラのハッシュとしてでしょうか。<code>perl</code>インタープリタには、明らかにどちらとも判断することができません。Perlの変わった一面であると理解したなら、次の事実が真であることもまた理解するでしょう: <strong>リストの値はネストできません。</strong> 試してみてください:</p>
 
@@ -402,7 +402,7 @@
 );
 </pre>
 
-<p class=original>Perl has no way of knowing whether <code>("inner", "list", "several", "entries")</code> is supposed to be an inner array or an inner hash. Therefore, Perl assumes that it is neither and <strong>flattens the list out into a single long list</strong>:</p>
+<p class="original">Perl has no way of knowing whether <code>("inner", "list", "several", "entries")</code> is supposed to be an inner array or an inner hash. Therefore, Perl assumes that it is neither and <strong>flattens the list out into a single long list</strong>:</p>
 
 <p>Perlには、<code>("inner"(訳註:内側の), "list"(訳註:リストが), "several"(訳註:複数の), "entries"(訳註:値))</code>が内包された配列なのか、ハッシュなのかどうかがわかりません。そのため、Perlはいずれでもないと想定し、<strong>ひとつの長いリストに平板化します</strong>:</p>
 
@@ -416,7 +416,7 @@
 print $array[6]; # "cherries"
 </pre>
 
-<p class=original>The same is true whether the fat comma is used or not:</p>
+<p class="original">The same is true whether the fat comma is used or not:</p>
 <p>ファットカンマを使っていてもいなくても同じく真です:</p>
 
 <pre class="perl original">
@@ -463,24 +463,24 @@
 print @parts;
 </pre>
 
-<p class=original>More on this shortly.</p>
+<p class="original">More on this shortly.</p>
 <p>詳細は後ほど。</p>
 
 <h2 class="original">Context</h2>
 <h2>コンテキスト</h2>
 
-<p class=original>Perl's most distinctive feature is that its code is <i>context-sensitive</i>. <strong>Every expression in Perl is evaluated either in scalar context or list context</strong>, depending on whether it is expected to produce a scalar or a list. Many Perl expressions and <a href="http://perldoc.perl.org/perlfunc.html">built-in functions</a> display radically different behaviour depending on the context in which they are evaluated.</p>
+<p class="original">Perl's most distinctive feature is that its code is <i>context-sensitive</i>. <strong>Every expression in Perl is evaluated either in scalar context or list context</strong>, depending on whether it is expected to produce a scalar or a list. Many Perl expressions and <a href="http://perldoc.perl.org/perlfunc.html">built-in functions</a> display radically different behaviour depending on the context in which they are evaluated.</p>
 
-<p>Perlの最も特徴のあるところは、コードが<i>コンテクストセンシティブ</i>なところです。<strong>Perlの全ての式はスカラコンテキストかリストコンテキストで評価されます</strong>。スカラかリストをのいずれかを作るかを期待されているかに依存します。多くのPerlの式と<a href="http://perldoc.perl.org/perlfunc.html">組込の関数</a>は、それが評価されるコンテキストによって、振る舞いに根本的に違いを見せます。</p>
+<p>Perlの最も特徴のあるところは、コードが<i>コンテクストセンシティブ</i>なところです。<strong>Perlの全ての式はスカラコンテキストかリストコンテキストで評価されます</strong>。スカラかリストをのいずれかを作るかを期待されているかに依存します。多くのPerlの式と<a href="http://perldoc.jp/docs/perl/perlfunc.pod">組込の関数</a>は、それが評価されるコンテキストによって、振る舞いに根本的に違いを見せます。</p>
 
-<p class=original>A scalar assignment such as <code>$scalar =</code> evaluates its expression in scalar context. In this case, the expression is <code>"Mendeleev"</code> and the returned value is the same scalar value <code>"Mendeleev"</code>:</p>
+<p class="original">A scalar assignment such as <code>$scalar =</code> evaluates its expression in scalar context. In this case, the expression is <code>"Mendeleev"</code> and the returned value is the same scalar value <code>"Mendeleev"</code>:</p>
 
 <p><code>$scalar =</code>のようなスカラの割り当てはスカラコンテキストとして評価されます。このケースでは、この式は<code>"Mendeleev"</code>と、返される値は<code>"Mendeleev"</code>と同じスカラになります:</p>
 
 <pre class="perl prettyprint">
 my $scalar = "Mendeleev";
 </pre>
-<p class=original>An array or hash assignment such as <code>@array =</code> or <code>%hash =</code> evaluates its expression in list context. A list value evaluated in list context returns the list, which then gets fed in to populate the array or hash:</p>
+<p class="original">An array or hash assignment such as <code>@array =</code> or <code>%hash =</code> evaluates its expression in list context. A list value evaluated in list context returns the list, which then gets fed in to populate the array or hash:</p>
 <p><code>@array =</code> や <code>%hash =</code> のような配列やハッシュの割り当ては、リストコンテキストで評価されます。リストの値はリストコンテキストで評価され、リストを返します。配列やハッシュに代入するようなときです:</p>
 
 <pre class="perl prettyprint">
@@ -488,22 +488,22 @@
 my %hash = ("Alpha" =&gt; "Beta", "Gamma" =&gt; "Pie");
 </pre>
 
-<p class=original>No surprises so far.</p>
+<p class="original">No surprises so far.</p>
 <p>驚くようなことはありません。</p>
 
-<p class=original>A scalar expression evaluated in list context turns into a single-element list:</p>
+<p class="original">A scalar expression evaluated in list context turns into a single-element list:</p>
 <p>スカラの式はリストコンテキストで評価されると、ひとつの値のリストとなります:</p>
 
 <pre class="perl prettyprint">
 my @array = "Mendeleev"; # same as 'my @array = ("Mendeleev");'
 </pre>
 
-<p class=original>A list expression evaluated in scalar context returns <em>the final scalar in the list</em>:</p>
+<p class="original">A list expression evaluated in scalar context returns <em>the final scalar in the list</em>:</p>
 <p>リストの式がスカラコンテキストで評価されると、<em>リストの最後のスカラ</em>を返します:</p>
 <pre class="perl prettyprint">
 my $scalar = ("Alpha", "Beta", "Gamma", "Pie"); # Value of $scalar is now "Pie"
 </pre>
-<p class=original>An array expression (an array is different from a list, remember?) evaluated in scalar context returns <em>the length of the array</em>:</p>
+<p class="original">An array expression (an array is different from a list, remember?) evaluated in scalar context returns <em>the length of the array</em>:</p>
 <p>配列の式(配列はリストと違います。覚えてる?)は、スカラコンテキストでは<em>配列の長さ</em>を返します:</p>
 
 <pre class="perl prettyprint">
@@ -511,7 +511,7 @@
 my $scalar = @array; # Value of $scalar is now 4
 </pre>
 <p class="original">The <code><a href="http://perldoc.perl.org/functions/print.html">print</a></code> built-in function evaluates all of its arguments in list context. In fact, <code>print</code> accepts an unlimited list of arguments and prints each one after the other, which means it can be used to print arrays directly:</p>
-<p><code><a href="http://perldoc.perl.org/functions/print.html">print</a></code> 組込関数は全ての引数をリストコンテキストで評価します。<code>print</code>は無制限のリストの引数を受取り、一つ一つ出力します。つまり、配列を直接与えることが出来ます。</p>
+<p><code><a href="http://perldoc.jp/func/print">print</a></code> 組込関数は全ての引数をリストコンテキストで評価します。<code>print</code>は無制限のリストの引数を受取り、一つ一つ出力します。つまり、配列を直接与えることが出来ます。</p>
 <pre class="perl prettyprint">
 my @array = ("Alpha", "Beta", "Goo");
 my $scalar = "-X-";
@@ -519,15 +519,15 @@
 print $scalar, @array, 98; # "-X-AlphaBetaGoo98";
 </pre>
 <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>どのような式も<code>scalar</code>組込関数を使えばスカラコンテキストで強制的に評価することが出来ます。このことが、なぜ<code><a href="http://perldoc.jp/func/scalar">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 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>
 
-<h2 class=original>References and nested data structures</h2>
+<h2 class="original">References and nested data structures</h2>
 <h2>リファレンスとネストされたデータ構造</h2>
 
-<p class=original>In the same way that lists cannot contain lists as elements, <strong>arrays and hashes cannot contain other arrays and hashes as elements.</strong> They can only contain scalars. Watch what happens when we try:</p>
+<p class="original">In the same way that lists cannot contain lists as elements, <strong>arrays and hashes cannot contain other arrays and hashes as elements.</strong> They can only contain scalars. Watch what happens when we try:</p>
 <p>リストが要素としてリストを含めないのと同様、<strong>配列とハッシュは他の配列やハッシュを要素として持てません</strong>。 両方ともスカラしか持てません。 今から試すことをよく見てください:</p>
 
 <pre class="perl prettyprint">
@@ -539,20 +539,20 @@
 print $outer[3]; # "2"
 </pre>
 
-<p class=original><code>$outer[3]</code> is a scalar, so it demands a scalar value. When you try to assign an array value like <code>@inner</code> to it, <code>@inner</code> is evaluated in scalar context. This is the same as assigning <code>scalar @inner</code>, which is the length of array <code>@inner</code>, which is 2.</p>
+<p class="original"><code>$outer[3]</code> is a scalar, so it demands a scalar value. When you try to assign an array value like <code>@inner</code> to it, <code>@inner</code> is evaluated in scalar context. This is the same as assigning <code>scalar @inner</code>, which is the length of array <code>@inner</code>, which is 2.</p>
 <p><code>$outer[3]</code>はスカラです。そのため、スカラの値を要求します。<code>@inner</code>のような配列を割り当てようとすると、<code>@inner</code>はスカラコンテキストで評価されます。つまり、<code>scalar @inner</code>と同じです。配列<code>@inner</code>の長さ、2になります。</p>
 
-<p class=original>However, a scalar variable may contain a <i>reference</i> to any variable, including an array variable or a hash variable. This is how more complicated data structures are created in Perl.</p>
+<p class="original">However, a scalar variable may contain a <i>reference</i> to any variable, including an array variable or a hash variable. This is how more complicated data structures are created in Perl.</p>
 <p>ですが, スカラ変数は、配列変数やハッシュ変数を含む、他の変数への<i>リファレンス</i>を持てます。これが、Perlでより複雑なデータ構造を作る方法です。</p>
 
-<p class=original>A reference is created using a backslash.</p>
+<p class="original">A reference is created using a backslash.</p>
 <p>リファレンスはバックスラッシュを使って作られます。</p>
 <pre class="perl prettyprint">
 my $colour    = "Indigo";
 my $scalarRef = \$colour;
 </pre>
 
-<p class=original>Any time you would use the name of a variable, you can instead just put some braces in, and, within the braces, put a <em>reference</em> to a variable instead.</p>
+<p class="original">Any time you would use the name of a variable, you can instead just put some braces in, and, within the braces, put a <em>reference</em> to a variable instead.</p>
 <p>いつでも、変数の名前を使えます。代わりにブレースを置いて、ブレース内に変数への<em>リファレンス</em>を置きます。</p>
 <pre class="perl prettyprint">
 print $colour;         # "Indigo"
@@ -560,14 +560,14 @@
 print ${ $scalarRef }; # "Indigo"
 </pre>
 
-<p class=original>As long as the result is not ambiguous, you can omit the braces too:</p>
+<p class="original">As long as the result is not ambiguous, you can omit the braces too:</p>
 <p>結果が曖昧でない限り、ブレースを省略することもできます:</p>
 
 <pre class="perl prettyprint">
 print $$scalarRef; # "Indigo"
 </pre>
 
-<p class=original>If your reference is a reference to an array or hash variable, you can get data out of it using braces or using the more popular arrow operator, <code>-&gt;</code>:</p>
+<p class="original">If your reference is a reference to an array or hash variable, you can get data out of it using braces or using the more popular arrow operator, <code>-&gt;</code>:</p>
 <p>リファレンスが配列かハッシュ変数のリファレンスの場合、ブレースかより一般的なアロー演算子、<code>-&gt;</code>を使ってデータを取り出せます:</p>
 
 <pre class="perl prettyprint">
@@ -586,7 +586,7 @@
 print $hashRef-&gt;{"Helium"};     # exactly the same thing - this is very common
 </pre>
 
-<h3 class=original>Declaring a data structure</h3>
+<h3 class="original">Declaring a data structure</h3>
 <h3>データ構造を宣言する</h3>
 
 <p class="original">Here are four examples, but in practice the last one is the most useful.</p>
@@ -618,7 +618,7 @@
 );
 </pre>
 
-<p class=original>That's obviously unnecessarily laborious, because you can shorten it to:</p>
+<p class="original">That's obviously unnecessarily laborious, because you can shorten it to:</p>
 <p>これは、明らかに不必要で骨の折れます。なぜなら、次のように省略できます:</p>
 
 <pre class="perl prettyprint">
@@ -641,7 +641,7 @@
 );
 </pre>
 
-<p class=original>It is also possible to declare <i>anonymous</i> arrays and hashes using different symbols. Use square brackets for an anonymous array and braces for an anonymous hash. The value returned in each case is a <em>reference</em> to the anonymous data structure in question. Watch carefully, this results in exactly the same <code>%account</code> as above:</p>
+<p class="original">It is also possible to declare <i>anonymous</i> arrays and hashes using different symbols. Use square brackets for an anonymous array and braces for an anonymous hash. The value returned in each case is a <em>reference</em> to the anonymous data structure in question. Watch carefully, this results in exactly the same <code>%account</code> as above:</p>
 <p>別の記号を使って<i>無名</i>配列やハッシュを宣言することも出来ます。四角いブラケットを無名配列に、ブレースを無名ハッシュに使います。それぞれ、返される値は、無名のデータ構造の<em>リファレンス</em>になります。注意して見てください。次の結果は、上の<code>%account</code>と全く同じです:</p>
 
 <pre class="perl prettyprint">
@@ -666,7 +666,7 @@
 );
 </pre>
 
-<p class=original>Or, for short (and this is the form you should <em>actually</em> use when declaring complex data structures in-line):</p>
+<p class="original">Or, for short (and this is the form you should <em>actually</em> use when declaring complex data structures in-line):</p>
 <p>または、省略するすると(そして、行でデータ複雑な構造を宣言する時に、<em>実際に</em>使うべき形です):</p>
 
 <pre class="perl prettyprint">
@@ -707,7 +707,7 @@
 print "\t", $owner2{"name"}, " (born ", $owner2{"DOB"}, ")\n";
 </pre>
 
-<p class=original>Or, for short:</p>
+<p class="original">Or, for short:</p>
 <p>または, 省略して:</p>
 
 <pre class="perl prettyprint">
@@ -721,7 +721,7 @@
 print "\t", $owner2{"name"}, " (born ", $owner2{"DOB"}, ")\n";
 </pre>
 
-<p class=original>Or using references and the <code>-&gt;</code> operator:</p>
+<p class="original">Or using references and the <code>-&gt;</code> operator:</p>
 <p>または、リファレンスと<code>-&gt;</code> を使って:</p>
 
 <pre class="perl prettyprint">
@@ -735,7 +735,7 @@
 print "\t", $owner2Ref-&gt;{"name"}, " (born ", $owner2Ref-&gt;{"DOB"}, ")\n";
 </pre>
 
-<p class=original>And if we completely skip all the intermediate values:</p>
+<p class="original">And if we completely skip all the intermediate values:</p>
 <p>そして、全ての中間の値をスキップするなら:</p>
 
 <pre class="perl prettyprint">
@@ -749,21 +749,21 @@
 <h3 class="original">How to shoot yourself in the foot with array references</h3>
 <h3>配列のリファレンスで自分で自分の足を撃つ方法</h3>
 
-<p class=original>This array has five elements:</p>
+<p class="original">This array has five elements:</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 class="original">This array, however, has ONE element (which happens to be a reference to an anonymous, five-element array):</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 class="original">This <em>scalar</em> is a reference to an anonymous, five-element array:</p>
 <p>次の <em>スカラ</em> は、無名の5つの要素の配列のリファレンスになります:</p>
 <pre class="perl prettyprint">
 my $array3Ref = [1, 2, 3, 4, 5];
@@ -772,12 +772,12 @@
 print @$array3Ref;     # "12345"
 </pre>
 
-<h2 class=original>Conditionals</h2>
+<h2 class="original">Conditionals</h2>
 <h2>条件</h2>
 
 <h3><code>if</code> ... <code>elsif</code> ... <code>else</code> ...</h3>
 
-<p class=original>No surprises here, other than the spelling of <code>elsif</code>:</p>
+<p class="original">No surprises here, other than the spelling of <code>elsif</code>:</p>
 <p><code>elsif</code>のスペル以外には驚くものはありません:</p>
 
 <pre class="perl prettyprint">
@@ -793,7 +793,7 @@
 }
 </pre>
 
-<p class=original>Perl provides a shorter "<i>statement</i> <code>if</code> <i>condition</i>" syntax which is highly recommended for short statements:</p>
+<p class="original">Perl provides a shorter "<i>statement</i> <code>if</code> <i>condition</i>" syntax which is highly recommended for short statements:</p>
 <p>Perlにはより短い "<i>ステートメント</i> <code>if</code> <i>条件</i>"のシンタックスがあります。短いステートメント用に、強く推奨されます:</p>
 
 <pre class="perl prettyprint">
@@ -812,20 +812,20 @@
 }
 </pre>
 
-<p class=original><code>unless</code> blocks are generally best avoided like the plague because they are very confusing. An "<code>unless</code> [... <code>else</code>]" block can be trivially refactored into an "<code>if</code> [... <code>else</code>]" block by negating the condition [or by keeping the condition and swapping the blocks]. Mercifully, there is no <code>elsunless</code> keyword.</p>
+<p class="original"><code>unless</code> blocks are generally best avoided like the plague because they are very confusing. An "<code>unless</code> [... <code>else</code>]" block can be trivially refactored into an "<code>if</code> [... <code>else</code>]" block by negating the condition [or by keeping the condition and swapping the blocks]. Mercifully, there is no <code>elsunless</code> keyword.</p>
 
 <p><code>unless</code>ブロックは災いのように避けるのが一番です。それらは混乱のもととなります。"<code>unless</code> [... <code>else</code>]"ブロックは簡単に、"<code>if</code> [... <code>else</code>]" ブロックに、条件を否定する[または、条件をそのままにブロックを交換する]ことでリファクタできます。幸い、 <code>elsunless</code>のキーワードはありません。</p>
 
-<p class=original>This, by comparison, is highly recommended because it is so easy to read:</p>
+<p class="original">This, by comparison, is highly recommended because it is so easy to read:</p>
 <p>一方で、以下は読みやすさのために、強く推奨されます</p>
 <pre class="perl prettyprint">
 print "Oh no it's too cold" unless $temperature > 15;
 </pre>
 
-<h3 class=original>Ternary operator</h3>
+<h3 class="original">Ternary operator</h3>
 <h3>三項演算子</h3>
 
-<p class=original>The ternary operator <code>?:</code> allows simple <code>if</code> statements to be embedded in a statement. The canonical use for this is singular/plural forms:</p>
+<p class="original">The ternary operator <code>?:</code> allows simple <code>if</code> statements to be embedded in a statement. The canonical use for this is singular/plural forms:</p>
 <p>三項演算子 <code>?:</code> は、単純な <code>if</code> ステートメントをひとつのステートメントに埋め込めます。三項演算子の標準的な使い方として、単数/複数の形があります:</p>
 
 <pre class="perl prettyprint">
@@ -833,7 +833,7 @@
 print "You gained ", $gain, " ", ($gain == 1 ? "experience point" : "experience points"), "!";
 </pre>
 
-<p class=original>Aside: singulars and plurals are best spelled out in full in both cases. Don't do something clever like the following, because anybody searching the codebase to replace the words "tooth" or "teeth" will never find this line:</p>
+<p class="original">Aside: singulars and plurals are best spelled out in full in both cases. Don't do something clever like the following, because anybody searching the codebase to replace the words "tooth" or "teeth" will never find this line:</p>
 <p>余談: 両方のケースの単数と複数を完全に書き出されています。決して以下のような巧妙なことをしないでください。コードを検索して、"tooth"か"teeth"の単語を置き換えようとしても、この行から見つけることができません。</p>
 
 <pre class="perl prettyprint">
@@ -841,7 +841,7 @@
 print "You lost ", $lost, " t", ($lost == 1 ? "oo" : "ee"), "th!";
 </pre>
 
-<p class=original>Ternary operators may be nested:</p>
+<p class="original">Ternary operators may be nested:</p>
 <p>三項演算子はネストできます:</p>
 
 <pre class="perl prettyprint">
@@ -851,16 +851,16 @@
                    "some eggs";
 </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 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>
 
-<h2 class=original>Loops</h2>
+<h2 class="original">Loops</h2>
 <h2>ループ</h2>
 
-<p class=original>There's More Than One Way To Do It.</p>
+<p class="original">There's More Than One Way To Do It.</p>
 <p>やりかたはひとつではありません。</p>
 
-<p class=original>Perl has a conventional <code>while</code> loop:</p>
+<p class="original">Perl has a conventional <code>while</code> loop:</p>
 <p>Perlの慣例的な<code>while</code> ループ:</p>
 
 <pre class="perl prettyprint">
@@ -903,7 +903,7 @@
 } until ($i &gt;= scalar @array);
 </pre>
 
-<p class=original>Basic C-style <code>for</code> loops are available too. Notice how we put a <code>my</code> inside the <code>for</code> statement, declaring <code>$i</code> only for the scope of the loop:</p>
+<p class="original">Basic C-style <code>for</code> loops are available too. Notice how we put a <code>my</code> inside the <code>for</code> statement, declaring <code>$i</code> only for the scope of the loop:</p>
 <p>基本的なC-styleの<code>for</code>ループも利用できます。<code>my</code>を<code>for</code>文の内側に置く方法に注意してください。宣言された<code>$i</code>はループのスコープでのみ有効です:</p>
 
 <pre class="perl prettyprint">
@@ -920,8 +920,8 @@
 }
 </pre>
 
-<p class=original>If you do need the indices, the <a href="http://perldoc.perl.org/perlop.html#Range-Operators">range operator</a> <code>..</code> creates an anonymous list of integers:</p>
-<p>複数のインデックスが必要なら、<a href="http://perldoc.perl.org/perlop.html#Range-Operators">範囲演算子</a><code>..</code>で整数の無名リストを作れます:</p>
+<p class="original">If you do need the indices, the <a href="http://perldoc.perl.org/perlop.html#Range-Operators">range operator</a> <code>..</code> creates an anonymous list of integers:</p>
+<p>複数のインデックスが必要なら、<a href="http://perldoc.jp/docs/perl/perlop.pod#Range32Operators">範囲演算子</a><code>..</code>で整数の無名リストを作れます:</p>
 
 <pre class="perl prettyprint">
 foreach my $i ( 0 .. $#array ) {
@@ -929,7 +929,7 @@
 }
 </pre>
 
-<p class=original>You can't iterate over a hash. However, you can iterate over its keys. Use the <code>keys</code> built-in function to retrieve an array containing all the keys of a hash. Then use the <code>foreach</code> approach that we used for arrays:</p>
+<p class="original">You can't iterate over a hash. However, you can iterate over its keys. Use the <code>keys</code> built-in function to retrieve an array containing all the keys of a hash. Then use the <code>foreach</code> approach that we used for arrays:</p>
 <p>ハッシュはイテレートできません。そのキーをイテレートできます。組込関数の<code>keys</code>を使って、ハッシュの全てのキーを含む配列を取り出してください。それから、配列で使った<code>foreach</code>のアプローチを使います:</p>
 
 <pre class="perl prettyprint">
@@ -938,7 +938,7 @@
 }
 </pre>
 
-<p class=original>Since a hash has no underlying order, the keys may be returned in any order. Use the <code>sort</code> built-in function to sort the array of keys alphabetically beforehand:</p>
+<p class="original">Since a hash has no underlying order, the keys may be returned in any order. Use the <code>sort</code> built-in function to sort the array of keys alphabetically beforehand:</p>
 <p>ハッシュには順番がありませんので、keysはどのような順番でも戻ります。組込の<code>sort</code>関数を使って、アルファベット順でキーの配列をソートできます:</p>
 <pre class="perl prettyprint">
 foreach my $key (sort keys %scientists) {
@@ -947,7 +947,7 @@
 </pre>
 
 <p class="original">If you don't provide an explicit iterator, Perl uses a default iterator, <code>$_</code>. <code>$_</code> is the first and friendliest of <a href="http://perldoc.perl.org/perlvar.html">built-in variables</a>:</p>
-<p>明示的なイテレータを使わなければ、Perlはデフォルトのイテレータとして<code>$_</code>を使います。<code>$_</code>は最初の最もフレンドリーな<a href="http://perldoc.perl.org/perlvar.html">組込の変数</a>です:</p>
+<p>明示的なイテレータを使わなければ、Perlはデフォルトのイテレータとして<code>$_</code>を使います。<code>$_</code>は最初の最もフレンドリーな<a href="http://perldoc.jp/docs/perl/perlvar.pod">組込の変数</a>です:</p>
 
 <pre class="perl prettyprint">
 foreach ( @array ) {
@@ -961,26 +961,26 @@
 print $_ foreach @array;
 </pre>
 
-<h3 class=original>Loop control</h3>
+<h3 class="original">Loop control</h3>
 <h3>ループ制御</h3>
 
-<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 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>
 
 <pre class="perl prettyprint">
 CANDIDATE: for my $candidate ( 3 .. 100 ) {
-	for my $divisor ( 2 .. <a href="http://perldoc.perl.org/functions/sqrt.html">sqrt</a> $candidate ) {
+	for my $divisor ( 2 .. <a href="http://perldoc.jp/func/sqrt">sqrt</a> $candidate ) {
 		next CANDIDATE if $candidate % $divisor == 0;
 	}
 	print $candidate." is prime\n";
 }
 </pre>
 
-<h2 class=original>Array functions</h2>
+<h2 class="original">Array functions</h2>
 <h2>配列関数</h2>
 
-<h3 class=original>In-place array modification</h3>
+<h3 class="original">In-place array modification</h3>
 <h3>その場で配列を変更する</h3>
 
 <p class="original">We'll use <code>@stack</code> to demonstrate these:</p>
@@ -992,49 +992,49 @@
 print @stack; # "FredEileenDeniseCharlie"
 </pre>
 
-<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>
+<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.jp/func/pop">pop</a></code> は配列の最後の要素を引き出して返します。スタックの上として考えられます:</p>
 <pre class="perl prettyprint">
 print pop @stack; # "Charlie"
 print @stack;     # "FredEileenDenise"
 </pre>
 
-<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>
+<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://perldocjp/func/push">push</a></code> は追加の要素を配列の最後に付加します:</p>
 <pre class="perl prettyprint">
 push @stack, "Bob", "Alice";
 print @stack; # "FredEileenDeniseBobAlice"
 </pre>
 
-<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>
+<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/func/shift">shift</a></code> は配列の最初の要素を引き出して返します:</p>
 <pre class="perl prettyprint">
 print shift @stack; # "Fred"
 print @stack;       # "EileenDeniseBobAlice"
 </pre>
 
-<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>
+<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.jp/func/unshift">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><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>
+<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.jp/func/splice">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"
 </pre>
 
-<h3 class=original>Creating new arrays from old</h3>
+<h3 class="original">Creating new arrays from old</h3>
 <h3>古い配列から新しい配列を作る</h3>
 
-<p class=original>Perl provides the following functions which act on arrays to create other arrays.</p>
+<p class="original">Perl provides the following functions which act on arrays to create other arrays.</p>
 <p>Perlには以下の関数があり、配列に対して、新しい配列を作ります</p>
 
 <p class="original">The <code><a href="http://perldoc.perl.org/functions/join.html">join</a></code> function concatenates many strings into one:</p>
-<p><code><a href="http://perldoc.perl.org/functions/join.html">join</a></code> 関数は多くの文字列を一つに結合します:</p>
+<p><code><a href="http://perldoc.jp/func/join">join</a></code> 関数は多くの文字列を一つに結合します:</p>
 
 <pre class="perl prettyprint">
 my @elements = ("Antimony", "Arsenic", "Aluminum", "Selenium");
@@ -1043,8 +1043,8 @@
 print join(", ", @elements); # "Antimony, Arsenic, Aluminum, Selenium"
 </pre>
 
-<p class=original>In list context, the <code><a href="http://perldoc.perl.org/functions/reverse.html">reverse</a></code> function returns a list in reverse order. In scalar context, <code>reverse</code> concatenates the whole list together and then reverses it as a single word.</p>
-<p>リストコンテキストでは、<code><a href="http://perldoc.perl.org/functions/reverse.html">reverse</a></code>関数は逆順のリストを返します。スカラーコンテキストでは<code>reverse</code>リストの全てをつなげて一つの文字列として、それを逆順にします。</p>
+<p class="original">In list context, the <code><a href="http://perldoc.perl.org/functions/reverse.html">reverse</a></code> function returns a list in reverse order. In scalar context, <code>reverse</code> concatenates the whole list together and then reverses it as a single word.</p>
+<p>リストコンテキストでは、<code><a href="http://perldoc.jp/func/reverse">reverse</a></code>関数は逆順のリストを返します。スカラーコンテキストでは<code>reverse</code>リストの全てをつなげて一つの文字列として、それを逆順にします。</p>
 <pre class="perl prettyprint">
 print reverse("Hello", "World");        # "WorldHello"
 print reverse("HelloWorld");            # "HelloWorld"
@@ -1052,8 +1052,8 @@
 print scalar reverse("Hello", "World"); # "dlroWolleH"
 </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 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><a href="http://perldoc.jp/func/map">map</a></code>関数は入力として配列をとり、配列内の全てのスカラ <code>$_</code>を操作します。結果として新しい配列を作ります。操作はひとつのブレースで渡します:</p>
 
 <pre class="perl prettyprint">
 my @capitals = ("Baton Rouge", "Indianapolis", "Columbus", "Montgomery", "Helena", "Denver", "Boise");
@@ -1062,26 +1062,26 @@
 # "BATON ROUGE, INDIANAPOLIS, COLUMBUS, MONTGOMERY, HELENA, DENVER, BOISE"
 </pre>
 
-<p class=original>The <code><a href="http://perldoc.perl.org/functions/grep.html">grep</a></code> function takes an array as input and returns a filtered array as output. The syntax is similar to <code>map</code>. This time, the second argument is evaluated for each scalar <code>$_</code> in the input array. If a boolean true value is returned, the scalar is put into the output array, otherwise not.</p>
-<p><code>grep</code>関数は入力として配列をとり、フィルターされた配列を出力します。シンタックスは<code>map</code>と似ています。今度は、第二引数は入力された配列の各スカラ<code>$_</code>を評価されます。ブーリアンで真の値が戻れば、スカラは配列として出力されますが、そうでなければ、出力されません。</p>
+<p class="original">The <code><a href="http://perldoc.perl.org/functions/grep.html">grep</a></code> function takes an array as input and returns a filtered array as output. The syntax is similar to <code>map</code>. This time, the second argument is evaluated for each scalar <code>$_</code> in the input array. If a boolean true value is returned, the scalar is put into the output array, otherwise not.</p>
+<p><code><a href="http://perldoc.jp/func/grep">grep</a></code>関数は入力として配列をとり、フィルターされた配列を出力します。シンタックスは<code>map</code>と似ています。今度は、第二引数は入力された配列の各スカラ<code>$_</code>を評価されます。ブーリアンで真の値が戻れば、スカラは配列として出力されますが、そうでなければ、出力されません。</p>
 
 <pre class="perl prettyprint">
 print join ", ", grep { length $_ == 6 } @capitals;
 # "Helena, Denver"
 </pre>
 
-<p class=original>Obviously, the length of the resulting array is the <em>number of successful matches</em>, which means you can use <code>grep</code> to quickly check whether an array contains an element:</p>
+<p class="original">Obviously, the length of the resulting array is the <em>number of successful matches</em>, which means you can use <code>grep</code> to quickly check whether an array contains an element:</p>
 <p>当然、結果の配列の長さは、<em>マッチに成功した数</em>になります、このとことは、<code>grep</code>を配列に要素があるかどうかを素早くチェックするのに使えることを意味します。:</p>
 
 <pre class="perl prettyprint">
 print scalar grep { $_ eq "Columbus" } @capitals; # "1"
 </pre>
 
-<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 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><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>
+<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><a href="http://perldoc.jp/func/sort">sort</a></code>関数は入力された配列を文字順(アルファベット順)に並びかえます:</p>
 
 <pre class="perl prettyprint">
 my @elevations = (19, 1, 2, 100, 3, 98, 100, 1056);
@@ -1093,7 +1093,7 @@
 <p class="original">However, similar to <code>grep</code> and <code>map</code>, you may supply some code of your own. Sorting is always performed using a series of comparisons between two elements. Your block receives <code>$a</code> and <code>$b</code> as inputs and should return -1 if <code>$a</code> is "less than" <code>$b</code>, 0 if they are "equal" or 1 if <code>$a</code> is "greater than" <code>$b</code>.</p>
 <p>しかし、<code>grep</code> と <code>map</code>と似て、自分のコードを渡すことも出来ます。ソートは常に2要素間の一連の比較を使ってされます。コードブロックは、<code>$a</code>と<code>$b</code>を受け、<code>$a</code>が<code>$b</code>"より小さ"ければ -1、"同じ"であれば 0、<code>$a</code>が<code>$b</code>"より大き"ければ 1 を返します。</p>
 
-<p class=original>The <code>cmp</code> operator does exactly this for strings:</p>
+<p class="original">The <code>cmp</code> operator does exactly this for strings:</p>
 <p><code>cmp</code> 演算子は文字列に対して、まさにこれをします:</p>
 
 <pre class="perl prettyprint">
@@ -1101,7 +1101,7 @@
 # "1, 100, 100, 1056, 19, 2, 3, 98"
 </pre>
 
-<p class=original>The "spaceship operator", <code>&lt;=&gt;</code>, does the same for numbers:</p>
+<p class="original">The "spaceship operator", <code>&lt;=&gt;</code>, does the same for numbers:</p>
 <p>"スペースシップ演算子", <code>&lt;=&gt;</code>は、数字に対して同じことをします:</p>
 
 <pre class="perl prettyprint">
@@ -1109,7 +1109,7 @@
 # "1, 2, 3, 19, 98, 100, 100, 1056"
 </pre>
 
-<p class=original><code>$a</code> and <code>$b</code> are always scalars, but they can be references to quite complex objects which are difficult to compare. If you need more space for the comparison, you can create a separate subroutine and provide its name instead:</p>
+<p class="original"><code>$a</code> and <code>$b</code> are always scalars, but they can be references to quite complex objects which are difficult to compare. If you need more space for the comparison, you can create a separate subroutine and provide its name instead:</p>
 <p><code>$a</code> と <code>$b</code> は常にスカラーですが、比較が難しい非常に複雑なオブジェクトのリファレンスもありえます。比較によりスペースが必要なら、別のサブルーチンを作り、代わりにその名前を渡せます:</p>
 
 <pre class="perl prettyprint">
@@ -1121,13 +1121,13 @@
 print join ", ", sort comparator @elevations;
 </pre>
 
-<p class=original>You can't do this for <code>grep</code> or <code>map</code> operations.</p>
+<p class="original">You can't do this for <code>grep</code> or <code>map</code> operations.</p>
 <p>同じことは、<code>grep</code> や <code>map</code> ではできません。</p>
 
-<p class=original>Notice how the subroutine and block are never explicitly provided with <code>$a</code> and <code>$b</code>. Like <code>$_</code>, <code>$a</code> and <code>$b</code> are, in fact, global variables which are <em>populated</em> with a pair of values to be compared each time.</p>
+<p class="original">Notice how the subroutine and block are never explicitly provided with <code>$a</code> and <code>$b</code>. Like <code>$_</code>, <code>$a</code> and <code>$b</code> are, in fact, global variables which are <em>populated</em> with a pair of values to be compared each time.</p>
 <p>サブルーチンとブロックは <code>$a</code> と <code>$b</code>と一緒には渡されません。<code>$_</code>のように、 <code>$a</code>と<code>$b</code>は、実際、グローバル変数で、その時々に、比較される値のペアで<em>埋められ</em>ます</p>
 
-<h2 class=original>Built-in functions</h2>
+<h2 class="original">Built-in functions</h2>
 <h2>組込関数</h2>
 <p class="original">By now you have seen at least a dozen built-in functions: <code>print</code>, <code>sort</code>, <code>map</code>, <code>grep</code>, <code>keys</code>, <code>scalar</code> and so on. Built-in functions are one of Perl's greatest strengths. They</p>
 <p>今までで、少なくともよくある組込関数が出てきました: <code>print</code>, <code>sort</code>, <code>map</code>, <code>grep</code>, <code>keys</code>, <code>scalar</code> など。 組込関数はPerlの最も偉大な強みのひとつです。それらは、</p>
@@ -1147,7 +1147,7 @@
 <ul>
 	<li>たくさんある</li>
 	<li>とても便利</li>
-	<li><a href="http://perldoc.perl.org/perlfunc.html">広くドキュント化</a>されている</li>
+	<li><a href="http://perldoc.jp/docs/perl/perlfunc.pod">広くドキュント化</a>されている</li>
 	<li>シンタックスで大きく異なるので、ドキュメントを見ること</li>
 	<li>引数として正規表現を受け付けるものもある</li>
 	<li>引数として完全なコードブロックを受け付けるものもある</li>
@@ -1156,21 +1156,21 @@
 	<li>引数が少なすぎる場合に、自分自身で引数を埋めるものもある</li>
 	<li>曖昧な状況でなければ、一般的に引数のまわりに括弧は不要</li>
 </ul>
-<p class=original>The best advice regarding built-in functions is to know that they exist, so that you can <strong>use them</strong>. If you are carrying out a task which feels like it's low-level and common enough that it's been done many times before, the chances are that it has.</p>
+<p class="original">The best advice regarding built-in functions is to know that they exist, so that you can <strong>use them</strong>. If you are carrying out a task which feels like it's low-level and common enough that it's been done many times before, the chances are that it has.</p>
 <p>組込関数が存在していることを知ることに館する最も良いアドバイスは、<strong>使ってみる</strong>ことです。低レベルで以前に何度も行っている十分に共通だと感じるタスクを実行しているなら、そのチャンスです。</p>
 
-<h2 class=original>User-defined subroutines</h2>
+<h2 class="original">User-defined subroutines</h2>
 <h2>ユーザー定義のサブルーチン</h2>
 
-<p class=original>Subroutines are declared using the <code>sub</code> keyword. In contrast with built-in functions, user-defined subroutines always accept the same input: a list of scalars. That list may of course have a single element, or be empty. A single scalar is taken as a list with a single element. A hash with <var>N</var> elements is taken as a list with 2<var>N</var> elements.</p>
+<p class="original">Subroutines are declared using the <code>sub</code> keyword. In contrast with built-in functions, user-defined subroutines always accept the same input: a list of scalars. That list may of course have a single element, or be empty. A single scalar is taken as a list with a single element. A hash with <var>N</var> elements is taken as a list with 2<var>N</var> elements.</p>
 
 <p>サブルーチンは<code>sub</code> キーワードを使って宣言されます。組込関数と対照的に、ユーザー定義のサブルーチンは常に同じ入力を受け付けます: スカラのリストです。そのリストは、もちろん、ひとつの要素か、空の場合もあります。ひとつのスカラは一つの要素のリストです。<var>N</var>要素のハッシュは2<var>N</var>要素のリストです。</p>
 
-<p class=original>Although the brackets are optional, subroutines should always be invoked using brackets, even when called with no arguments. This makes it clear that a subroutine call is happening.</p>
+<p class="original">Although the brackets are optional, subroutines should always be invoked using brackets, even when called with no arguments. This makes it clear that a subroutine call is happening.</p>
 <p>括弧はオプションですが、サブルーチンは、引数がひとつも無くても、常に括弧付きで使うべきです。こうしておけば、サブルーチンが呼ばれたことが、明確になります。</p>
 
-<p class=original>Once you're inside a subroutine, the arguments are available using the <a href="http://perldoc.perl.org/perlvar.html">built-in array variable</a> <code>@_</code>. Example:</p>
-<p>サブルーチンの中に入ってしまうと、<a href="http://perldoc.perl.org/perlvar.html">組込の配列変数</a><code>@_</code>が使えます。例:</p>
+<p class="original">Once you're inside a subroutine, the arguments are available using the <a href="http://perldoc.perl.org/perlvar.html">built-in array variable</a> <code>@_</code>. Example:</p>
+<p>サブルーチンの中に入ってしまうと、<a href="http://perldoc.jp/docs/perl/perlvar.pod">組込の配列変数</a><code>@_</code>が使えます。例:</p>
 
 <pre class="perl prettyprint">
 sub hyphenate {
@@ -1179,21 +1179,21 @@
   my $word = shift @_;
 
   # An overly clever list comprehension
-  $word = join "-", map { <a href="http://perldoc.perl.org/functions/substr.html">substr</a> $word, $_, 1 } (0 .. (<a href="http://perldoc.perl.org/functions/length.html">length</a> $word) - 1);
+  $word = join "-", map { <a href="http://perldoc.jp/func/substr">substr</a> $word, $_, 1 } (0 .. (<a href="http://perldoc.jp/func/length">length</a> $word) - 1);
   return $word;
 }
 
 print hyphenate("exterminate"); # "e-x-t-e-r-m-i-n-a-t-e"
 </pre>
 
-<h3 class=original>Unpacking arguments</h3>
+<h3 class="original">Unpacking arguments</h3>
 <h3>引数を取り出す</h3>
-<p class=original>There's More Than One Way To unpack <code>@_</code>, but some are superior to others.</p>
+<p class="original">There's More Than One Way To unpack <code>@_</code>, but some are superior to others.</p>
 <p><code>@_</code>を取り出すのにいくつかやり方があります。 ですが、いくつかは、他のものより、より良いです。</p>
 
-<p class=original>The example subroutine <code>left_pad</code> below pads a string out to the required length using the supplied pad character. (The <code>x</code> function concatenates multiple copies of the same string in a row.) (Note: for brevity, these subroutines all lack some elementary error checking, i.e. ensuring the pad character is only 1 character, checking that the width is greater than or equal to the length of existing string, checking that all needed arguments were passed at all.)</p>
+<p class="original">The example subroutine <code>left_pad</code> below pads a string out to the required length using the supplied pad character. (The <code>x</code> function concatenates multiple copies of the same string in a row.) (Note: for brevity, these subroutines all lack some elementary error checking, i.e. ensuring the pad character is only 1 character, checking that the width is greater than or equal to the length of existing string, checking that all needed arguments were passed at all.)</p>
 <p>例のサブルーチン<code>left_pad</code>は、以下の例は、渡された詰め込み文字を使って、必要な長さになるまで文字列に付加します。(<code>x</code>関数は行に同じ文字列の複数のコピーをつなげます)。(注意: 簡潔さのために、これらのサブルーチンは全て基本的なエラーチェックを行っていません。例えば、詰め込み文字が1文字のみであることを保証するとか、長さが既存の文字列の長さ以上であるか、必要な引数が全て渡されているかどうか、など)。</p>
-<p class=original><code>left_pad</code> is typically invoked as follows:</p>
+<p class="original"><code>left_pad</code> is typically invoked as follows:</p>
 <p><code>left_pad</code> は典型的に、次のように呼ばれます:</p>
 <pre class="perl prettyprint">
 print left_pad("hello", 10, "+"); # "+++++hello"
@@ -1201,7 +1201,7 @@
 
 <ol>
 	<li>
-		<p class=original>Some people don't unpack the arguments at all and use <code>@_</code> "live". This is ugly and discouraged:</p>
+		<p class="original">Some people don't unpack the arguments at all and use <code>@_</code> "live". This is ugly and discouraged:</p>
   		<p>人によっては、引数を取り出さずに<code>@_</code>を"そのまま"使うかもしれません。これは、醜いので非推奨です:</p>
 <pre class="perl prettyprint">
 sub left_pad {
@@ -1211,7 +1211,7 @@
 </pre>
 	</li>
 	<li>
-		<p class=original>Unpacking <code>@_</code> is only slightly less strongly discouraged:</p>
+		<p class="original">Unpacking <code>@_</code> is only slightly less strongly discouraged:</p>
 		<p><code>@_</code>の取り出しは、ほんの少しずつするのは、強く推奨されません:</p>
 <pre class="perl prettyprint">
 sub left_pad {
@@ -1224,7 +1224,7 @@
 </pre>
 	</li>
 	<li>
-		<p class=original>Unpacking <code>@_</code> by removing data from it using <code>shift</code> is recommended for up to 4 arguments:</p>
+		<p class="original">Unpacking <code>@_</code> by removing data from it using <code>shift</code> is recommended for up to 4 arguments:</p>
 		<p><code>@_</code>を取り出すのに、<code>shift</code>を使って、@_からデータを削除するのは、引数が4つまでなら推奨されます:</p>
 <pre class="perl prettyprint">
 sub left_pad {
@@ -1235,7 +1235,7 @@
 	return $newString;
 }
 </pre>
-		<p class=original>If no array is provided to the <code>shift</code> function, then it operates on <code>@_</code> implicitly. This approach is seen very commonly:</p>
+		<p class="original">If no array is provided to the <code>shift</code> function, then it operates on <code>@_</code> implicitly. This approach is seen very commonly:</p>
 		<p><code>shift</code>に配列を渡さなければ、暗黙に、<code>@_</code>に対して操作します。このアプローチはとてもよく見られます:</p>
 <pre class="perl prettyprint">
 sub left_pad {
@@ -1246,11 +1246,11 @@
 	return $newString;
 }
 </pre>
-		<p class=original>Beyond 4 arguments it becomes hard to keep track of what is being assigned where.</p>
+		<p class="original">Beyond 4 arguments it becomes hard to keep track of what is being assigned where.</p>
 		<p>引数が5つ以上になるなら、どこで割り当てたかを追い続けるのが難しくなるでしょう。</p>
 	</li>
 	<li>
-		<p class=original>You can unpack <code>@_</code> all in one go using multiple simultaneous scalar assignment. Again, this is okay for up to 4 arguments:</p>
+		<p class="original">You can unpack <code>@_</code> all in one go using multiple simultaneous scalar assignment. Again, this is okay for up to 4 arguments:</p>
 		<p><code>@_</code>の取り出しを、同時に全て一度にスカラに割り当てることが出来ます。 この方法も、引数が4つまでなら問題ありません:</p>
 <pre class="perl prettyprint">
 sub left_pad {
@@ -1261,12 +1261,12 @@
 </pre>
 	</li>
 	<li>
-		<p class=original>For subroutines with large numbers of arguments or where some arguments are optional or cannot be used in combination with others, best practice is to require the user to provide a hash of arguments when calling the subroutine, and then unpack <code>@_</code> back into that hash of arguments. For this approach, our subroutine call would look a little different:</p>
+		<p class="original">For subroutines with large numbers of arguments or where some arguments are optional or cannot be used in combination with others, best practice is to require the user to provide a hash of arguments when calling the subroutine, and then unpack <code>@_</code> back into that hash of arguments. For this approach, our subroutine call would look a little different:</p>
 		<p>引数が多いサブルーチンや、いくつかの引数がオプションであるとか、他との組み合わせで使えないなら、最も良い方法は、サブルーチンの呼び出し時に、ユーザにハッシュの引数を渡させることです。そして、<code>@_</code>をハッシュに取り出します。このアプローチのために、サブルーチンの呼び出しはちょっと違ったものになります:</p>
 <pre class="perl prettyprint">
 print left_pad("oldString" =&gt; "pod", "width" =&gt; 10, "padChar" =&gt; "+");
 </pre>
-		<p class=original>And the subroutine itself looks like this:</p>
+		<p class="original">And the subroutine itself looks like this:</p>
 		<p>そして、サブルーチン自身は次のようになります:</p>
 <pre class="perl prettyprint">
 sub left_pad {
@@ -1277,9 +1277,9 @@
 </pre>
 	</li>
 </ol>
-<h3 class=original>Returning values</h3>
+<h3 class="original">Returning values</h3>
 <h3>戻り値</h3>
-<p class=original>Like other Perl expressions, subroutine calls may display contextual behaviour. You can use the <code>wantarray</code> function (which should be called <code>wantlist</code> but never mind) to detect what context the subroutine is being evaluated in, and return a result appropriate to that context:</p>
+<p class="original">Like other Perl expressions, subroutine calls may display contextual behaviour. You can use the <code>wantarray</code> function (which should be called <code>wantlist</code> but never mind) to detect what context the subroutine is being evaluated in, and return a result appropriate to that context:</p>
 
 <p>他のPerlの式と同様、サブルーチン呼び出しは、コンテキスト依存の振る舞いをします。<code>wantlist</code>(<code>wantlist</code>と呼ばれるべきですが、気にしないでください)を使って、どのコンテキストでサブルーチンが評価されているかをチェックでき、コンテキストに適した結果を返すことが出来ます:</p>
 
@@ -1303,9 +1303,9 @@
 <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><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>Perlから終了する際に、<code><a href="http://perldoc.jp/func/exit">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.jp/docs/perl/perlvar.pod">組込のスカラ変数</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">
@@ -1332,11 +1332,11 @@
 <h2 class="original">Files and file handles</h2>
 <h2>ファイルとファイルハンドル</h2>
 
-<p class=original>A scalar variable may contain a <i>file handle</i> instead of a number/string/reference or <code>undef</code>. A file handle is essentially a reference to a specific location inside a specific file.</p>
+<p class="original">A scalar variable may contain a <i>file handle</i> instead of a number/string/reference or <code>undef</code>. A file handle is essentially a reference to a specific location inside a specific file.</p>
 <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>&lt;</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>&lt;</code> は、ファイルから読み出したいことを意図します:</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>&lt;</code> indicates that we wish to open the file to read from it:</p>
+<p><code><a href="http://perldoc.jp/func/open">open</a></code>を使って、スカラ変数をファイルハンドルにします。<code>open</code>は<i>モード</i>とともに使われなければいけません。モード <code>&lt;</code> は、ファイルから読み出したいことを意図します:</p>
 
 <pre class="perl prettyprint">
 my $f = "text.txt";
@@ -1356,8 +1356,8 @@
 <p class="original">Note the need for parentheses around the <code>open</code> call's arguments.</p>
 <p><code>open</code>呼び出しの引数に括弧が必要なことに注意してください。</p>
 
-<p class=original>To read a line of text from a filehandle, use the <code><a href="http://perldoc.perl.org/functions/readline.html">readline</a></code> built-in function. <code>readline</code> returns a full line of text, with a line break intact at the end of it (except possibly for the final line of the file), or <code>undef</code> if you've reached the end of the file.</p>
-<p>ファイルハンドルからテキストの行を読むために、組込関数の<code><a href="http://perldoc.perl.org/functions/readline.html">readline</a></code>を使えます。<code>readline</code>は、テキストの一行全体を、その終わりに改行をそのまま含んで返す(たぶんファイルの最終行を除いて)か、ファイルの最後に達すると<code>undef</code>を返します。</p>
+<p class="original">To read a line of text from a filehandle, use the <code><a href="http://perldoc.perl.org/functions/readline.html">readline</a></code> built-in function. <code>readline</code> returns a full line of text, with a line break intact at the end of it (except possibly for the final line of the file), or <code>undef</code> if you've reached the end of the file.</p>
+<p>ファイルハンドルからテキストの行を読むために、組込関数の<code><a href="http://perldoc.jp/func/readline">readline</a></code>を使えます。<code>readline</code>は、テキストの一行全体を、その終わりに改行をそのまま含んで返す(たぶんファイルの最終行を除いて)か、ファイルの最後に達すると<code>undef</code>を返します。</p>
 
 <pre class="perl prettyprint">
 while(1) {
@@ -1367,7 +1367,7 @@
 }
 </pre>
 <p class="original">To truncate that possible trailing line break, use <code><a href="http://perldoc.perl.org/functions/chomp.html">chomp</a></code>:</p>
-<p><code><a href="http://perldoc.perl.org/functions/chomp.html">chomp</a></code>を使うと改行を取り除けます:</p>
+<p><code><a href="http://perldoc.jp/func/chomp">chomp</a></code>を使うと改行を取り除けます:</p>
 <pre class="perl prettyprint">
 chomp $line;
 </pre>
@@ -1375,7 +1375,7 @@
 <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>
+<p><code><a href="http://perldoc.jp/func/eof">eof</a></code>を使ってファイルの終端を判断することもできます:</p>
 <pre class="perl prettyprint">
 while(!eof $fh) {
 	my $line = readline $fh;
@@ -1406,11 +1406,11 @@
 <p class="original">Notice the absence of a comma between <code>$fh2</code> and the next argument.</p>
 <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 class="original">File handles are actually closed automatically when they drop out of scope, but otherwise:</p>
 <p>ファイルハンドルはスコープを抜けると自動的に閉じられます。もしくは、次のようにします:</p>
 
 <pre class="perl prettyprint">
-<a href="http://perldoc.perl.org/functions/close.html">close</a> $fh2;
+<a href="http://perldoc.jp/func/close">close</a> $fh2;
 close $fh;
 </pre>
 
@@ -1429,20 +1429,20 @@
 <p class="original">As you may have gathered, <code>print</code> prints to <code>STDOUT</code> by default if no filehandle is named.</p>
 <p>分かるかと思いますが、<code>print</code>は、ファイルハンドルが省略された場合は、デフォルトで<code>STDOUT</code>に出力しますす。</p>
 
-<h3 class=original>File tests</h3>
+<h3 class="original">File tests</h3>
 <h3>ファイルテスト</h3>
 
-<p class=original>The function <code>-e</code> is a built-in function which tests whether the named file exists.</p>
+<p class="original">The function <code>-e</code> is a built-in function which tests whether the named file exists.</p>
 <p>関数<code>-e</code> は組込の関数で与えられた名前のファイルが存在するかどうかをテストします。</p>
 <pre class="perl prettyprint">
 print "what" unless -e "/usr/bin/perl";
 </pre>
-<p class=original>The function <code>-d</code> is a built-in function which tests whether the named file is a directory.</p>
+<p class="original">The function <code>-d</code> is a built-in function which tests whether the named file is a directory.</p>
 <p>関数<code>-d</code> は組込の関数で与えられた名前のファイルがディレクトリかどうかをテストします。</p>
-<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 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"(訳註: "perl ファイルテスト")で検索して下さい。</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.jp/func/-X">大きなクラスの関数</a>の3つの関数です。<code>X</code>は小文字か大文字です。これらの関数は<i>ファイルテスト</i>と呼ばれます。マイナス記号が先に来ることに気をつけてください。Googleクエリでは、マイナス記号は、その言葉を結果に含めないことを指示します。そのため、ファイルテストをGoogleで検索しづらくしています! 代わりに、 "perl file test"(訳註: "perl ファイルテスト")で検索して下さい。</p>
 
 <h2 class="original">Regular expressions</h2>
 <h2>正規表現</h2>
@@ -1535,17 +1535,17 @@
 # returns true
 </pre>
 
-<h2 class=original>Modules and packages</h2>
+<h2 class="original">Modules and packages</h2>
 <h2>モジュールとパッケージ</h2>
 
 <p class="original">In Perl, modules and packages are different things.</p>
 <p>Perlにおいて、モジュールとパッケージは別物です。</p>
 
 
-<h3 class=original>Modules</h3>
+<h3 class="original">Modules</h3>
 <h3>モジュール</h3>
 
-<p class=original>A <i>module</i> is a <code>.pm</code> file that you can include in another Perl file (script or module). A module is a text file with exactly the same syntax as a <code>.pl</code> Perl script. An example module might be located at <code>C:\foo\bar\baz\Demo\StringUtils.pm</code> or <code>/foo/bar/baz/Demo/StringUtils.pm</code>, and read as follows:</p>
+<p class="original">A <i>module</i> is a <code>.pm</code> file that you can include in another Perl file (script or module). A module is a text file with exactly the same syntax as a <code>.pl</code> Perl script. An example module might be located at <code>C:\foo\bar\baz\Demo\StringUtils.pm</code> or <code>/foo/bar/baz/Demo/StringUtils.pm</code>, and read as follows:</p>
 <p>A <i>モジュール</i>は、他のPerlファイル(スクリプトかモジュール)に含めることが出来る<code>.pm</code>ファイルです。モジュールは <code>.pl</code> Perlスクリプトとまったく同じシンタックのステキストファイルです。例のモジュールは、<code>C:\foo\bar\baz\Demo\StringUtils.pm</code> か <code>/foo/bar/baz/Demo/StringUtils.pm</code>にあります。続きを読んでください:</p>
 <pre class="perl prettyprint">
 use strict;
@@ -1560,22 +1560,22 @@
 return 1;
 </pre>
 
-<p class=original>Because a module is executed from top to bottom when it is loaded, you need to return a true value at the end to show that it was loaded successfully.</p>
+<p class="original">Because a module is executed from top to bottom when it is loaded, you need to return a true value at the end to show that it was loaded successfully.</p>
 <p>モジュールはロードされると、最初から最後まで実行されるので、ロードが成功したことを示すために、最後に真の値を返す必要があります。</p>
 
-<p class=original>So that the Perl interpreter can find them, directories containing Perl modules should be listed in your environment variable <code>PERL5LIB</code> beforehand. List the root directory containing the modules, don't list the module directories or the modules themselves:</p>
+<p class="original">So that the Perl interpreter can find them, directories containing Perl modules should be listed in your environment variable <code>PERL5LIB</code> beforehand. List the root directory containing the modules, don't list the module directories or the modules themselves:</p>
 <p>Perlインタープリタはそれらを見つけることができるためには、その前に、Perlモジュールが入っているディレクトリが、環境変数<code>PERL5LIB</code>にリストされているべきです。モジュールが入っているルートディレクトリをリストしてください。モジュールのディレクトリやモジュール自身をリストしてはいけません。</p>
 
 <pre class="bash">
 set PERL5LIB=C:\foo\bar\baz;%PERL5LIB%
 </pre>
-<p class=original>or</p>
+<p class="original">or</p>
 <p>または</p>
 <pre class="bash">
 export PERL5LIB=/foo/bar/baz:$PERL5LIB
 </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 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>
 
 <pre class="perl prettyprint">
@@ -1593,10 +1593,10 @@
 <p class="original">Now a problem surfaces: if <code>main.pl</code> contains many <code>require</code> calls, and each of the modules so loaded contains more <code>require</code> calls, then it can become difficult to track down the original declaration of the <code>zombify</code> subroutine. The solution to this problem is to use packages.</p>
 <p>ここで問題が表面化します: <code>main.pl</code>が、多くの<code>require</code> を呼んでいて、それぞれのモジュールがさらに<code>require</code>を呼んでいる場合、<code>zombify</code>サブルーチンの元の宣言がどこにあるのか、追いにくくなります。その解決策としては、パッケージを使うことです。</p>
 
-<h3 class=original>Packages</h3>
+<h3 class="original">Packages</h3>
 <h3>パッケージ</h3>
 
-<p class=original>A <i>package</i> is a namespace in which subroutines can be declared. Any subroutine you declare is implicitly declared within the current package. At the beginning of execution, you are in the <code>main</code> package, but you can switch package using the <code>package</code> built-in function:</p>
+<p class="original">A <i>package</i> is a namespace in which subroutines can be declared. Any subroutine you declare is implicitly declared within the current package. At the beginning of execution, you are in the <code>main</code> package, but you can switch package using the <code>package</code> built-in function:</p>
 <p><i>package</i>は名前空間で、その中で、サブルーチンを宣言できます。宣言したサブルーチンは、暗黙的に、現在のパッケージ内に宣言されます。実行の最初は、<code>main</code>パッケージになりますが、組込関数の<code>package</code>を使って、パッケージを切り替えられます:</p>
 
 <pre class="perl prettyprint">
@@ -1657,14 +1657,14 @@
 print <ins>Demo::StringUtils::</ins>zombify("i want brains"); # "r wrnt brrrns"
 </pre>
 
-<p class=original>Now read this next bit carefully.</p>
+<p class="original">Now read this next bit carefully.</p>
 <p>では、次はちょっと注意して読んでください。</p>
-<p class=original>Packages and modules are two completely separate and distinct features of the Perl programming language. The fact that they both use the same double colon delimiter is a monumental red herring. It is possible to switch packages multiple times over the course of a script or module, and it is possible to use the same package declaration in multiple locations in multiple files. Calling <code>require Foo::Bar</code> <em>does not</em> look for and load a file with a <code>package Foo::Bar</code> declaration somewhere inside it, nor does it necessarily load subroutines in the <code>Foo::Bar</code> namespace. Calling <code>require Foo::Bar</code> merely loads a file called <code>Foo/Bar.pm</code>, which need not have <em>any</em> kind of package declaration inside it at all, and in fact might declare <code>package Baz::Qux</code> and other nonsense inside it for all you know.</p>
+<p class="original">Packages and modules are two completely separate and distinct features of the Perl programming language. The fact that they both use the same double colon delimiter is a monumental red herring. It is possible to switch packages multiple times over the course of a script or module, and it is possible to use the same package declaration in multiple locations in multiple files. Calling <code>require Foo::Bar</code> <em>does not</em> look for and load a file with a <code>package Foo::Bar</code> declaration somewhere inside it, nor does it necessarily load subroutines in the <code>Foo::Bar</code> namespace. Calling <code>require Foo::Bar</code> merely loads a file called <code>Foo/Bar.pm</code>, which need not have <em>any</em> kind of package declaration inside it at all, and in fact might declare <code>package Baz::Qux</code> and other nonsense inside it for all you know.</p>
 <p>パッケージとモジュールの2つは、プログラミング言語Perlにおいて完全に分かれており、区別された機能です。この2つが同じダブルコロンのデリミタを使っていることは、重要なひっかけです。これは、スクリプトまたはモジュールのコース経由でパッケージを複数回切り替えることができ、また、複数のファイル内の複数の場所で同一のパッケージ宣言を使うこともできます。<code>require Foo::Bar</code>を呼ぶことは<code>Foo::Bar</code>名前空間にあるサブルーチンやパッケージ変数を必ずしもロード<em>しません</em>し、<code>Foo::Bar</code>名前空間のサブルーチンを必ずしもロードするわけではありません。<code>require Foo::Bar</code>を呼ぶことは、単に<code>Foo/Bar.pm</code>というファイルをロードするだけであり、そのファイルに、<em>どのような<
 /em>種類のパッケージ宣言も必要有りません。実際には、<code>package Baz::Qux</code>のようなナンセンスな宣言もできます。</p>
 
-<p class=original>Likewise, a subroutine call <code>Baz::Qux::processThis()</code> need not necessarily have been declared inside a file named <code>Baz/Qux.pm</code>. It could have been declared <em>literally anywhere</em>.</p>
+<p class="original">Likewise, a subroutine call <code>Baz::Qux::processThis()</code> need not necessarily have been declared inside a file named <code>Baz/Qux.pm</code>. It could have been declared <em>literally anywhere</em>.</p>
 <p>その上、<code>Baz::Qux::processThis()</code>のサブルーチン呼び出しは、<code>Baz/Qux.pm</code>という名前のファイル内に宣言されている必要すらありません。<em>文字通り、どこにでも</em>定義することができます。</p>
-<p class=original>Separating these two concepts is one of the stupidest features of Perl, and treating them as separate concepts invariably results in chaotic, maddening code. Fortunately for us, the majority of Perl programmers obey the following two laws:</p>
+<p class="original">Separating these two concepts is one of the stupidest features of Perl, and treating them as separate concepts invariably results in chaotic, maddening code. Fortunately for us, the majority of Perl programmers obey the following two laws:</p>
 <p>この2つのコンセプトを分けてしまったことは、Perlの最も愚かな特徴の1つであり、これら2つのコンセプトを分けて取り扱ってしまうと常に、カオスで気の狂ったようなコードとなります。幸運なことに、Perlプログラマの多くは、次の2つの規則に従っています:</p>
 <ol class="original">
 	<li><strong>A Perl script (<code>.pl</code> file) must always contain exactly zero <code>package</code> declarations.</strong></li>
@@ -1764,7 +1764,7 @@
 <h3 class="original">Constructors</h3>
 <h3>コンストラクタ</h3>
 
-<p class=original>A constructor is a class method which returns a new object. If you want one, just declare one. You can use any name you like. For class methods, the first argument passed is not an object but a class name. In this case, <code>"Animal"</code>:</p>
+<p class="original">A constructor is a class method which returns a new object. If you want one, just declare one. You can use any name you like. For class methods, the first argument passed is not an object but a class name. In this case, <code>"Animal"</code>:</p>
 <p>コンストラクタはクラスメソッドで、新しいオブジェクトを返します。コンストラクタが欲しければ、それを宣言するだけです。好きな名前を使えます。クラスメソッドには、最初の引数として、オブジェクトではなくクラス名が渡ります。このケースでは、<code>"Animal"</code>です:</p>
 <pre class="perl prettyprint">
 use strict;
@@ -1780,7 +1780,7 @@
 # ...etc.
 </pre>
 
-<p class=original>And then use it like so:</p>
+<p class="original">And then use it like so:</p>
 <p>次のように使います:</p>
 <pre class="perl prettyprint">
 my $animal = Animal-&gt;new();
@@ -1908,7 +1908,7 @@
 
 <p class="original">The most common way to define an <code>import()</code> method is to inherit it from the <a href="http://perldoc.perl.org/Exporter.html">Exporter</a> module. Exporter is a core module, and a <i>de facto</i> core feature of the Perl programming language. In Exporter's implementation of <code>import()</code>, the list of arguments that you pass in is interpreted as a list of subroutine names. When a subroutine is <code>import()</code>ed, it becomes available in the current package as well as in its own original package.</p></p>
 
-<p><code>import()</code>メソッドを定義する常識的な方法は Exporter モジュールから継承することです。Exporter はコアモジュールで、プログラミング言語Perlの<i>デファクト</i>のコアの機能です。Exporterの<code>import</code>の実装で、渡した引数のリストは、サブルーチンの名前として解釈されます。サブルーチンが<code>import()</code>されると、現在の名前空間で、そのオリジナルの名前空間にあるかのと同じように、利用可能になります。</p>
+<p><code>import()</code>メソッドを定義する常識的な方法は <a href="http://perldoc.perl.org/Exporter.html">Exporter</a> モジュールから継承することです。Exporter はコアモジュールで、プログラミング言語Perlの<i>デファクト</i>のコアの機能です。Exporterの<code>import</code>の実装で、渡した引数のリストは、サブルーチンの名前として解釈されます。サブルーチンが<code>import()</code>されると、現在の名前空間で、そのオリジナルの名前空間にあるかのと同じように、利用可能になります。</p>
 <p class="original">This concept is easiest to grasp using an example. Here's what <code>Caterpillar.pm</code> looks like:</p>
 <p>このコンセプトは例を使うと把握しやすいでしょう。<code>Caterpillar.pm</code>は次のようなものです:</p>
 
@@ -1954,7 +1954,7 @@
 <p class="original">The package variable <code>@EXPORT</code> can be populated with a list of subroutines to be exported by default. These are exported if <code>import()</code> is called with no arguments at all, which is what happens in this example.</p>
 <p>パッケージ変数<code>@EXPORT</code>はデフォルトでエクスポートされるサブルーチンのリストを入れます。<code>import()</code> が引数なしで呼ばれた場合に、この例で起きることが起きます。</p>
 
-<p class=original>>As a result of being <code>import()</code>ed, a method such as <code>Caterpillar::crawl()</code> become available without qualification as <code>crawl()</code>. This saves typing. (Note: regardless of the content of <code>@EXPORT_OK</code>, every method can always be called "longhand", as shown above. There are no private methods in Perl. Customarily, a method intended for private use is named with a leading underscore or two.)</p>
+<p class="original">>As a result of being <code>import()</code>ed, a method such as <code>Caterpillar::crawl()</code> become available without qualification as <code>crawl()</code>. This saves typing. (Note: regardless of the content of <code>@EXPORT_OK</code>, every method can always be called "longhand", as shown above. There are no private methods in Perl. Customarily, a method intended for private use is named with a leading underscore or two.)</p>
 
 <p><code>import()</code>された結果として、<code>Caterpillar::crawl()</code>のようなメソッドが<code>crawl()</code>のように、修飾なしに利用可能になります。これは、タイプ数の節約になります。(注意: <code>@EXPORT_OK</code>のコンセプトにかかわらず、 全てのメソッドは、上で見たように、"longhand"で呼ぶことが出来ます。 Perlにはプライベートメソッドはありません。通例、1つか2つのアンダースコアから始まる名前が付けられたメソッドはプライベートを意図します。</p>
 
@@ -1985,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.jp/docs/perl/perlop.pod#Quote32and32Quote-like32Operators">多くの他のクォートライクなオペレータ</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>
@@ -2001,7 +2001,7 @@
 	</li>
 	<li>
 		<p class="original">If you see a block of unformatted code wrapped in a delimiter with double chevrons, like <code><a href="http://perldoc.perl.org/perlop.html#Quote-and-Quote-like-Operators">&lt;&lt;EOF</a></code>, the magic word to Google for is "here-doc".</p>
-                <p>like <code><a href="http://perldoc.perl.org/perlop.html#Quote-and-Quote-like-Operators">&lt;&lt;EOF</a></code>のように、2つの山括弧で区切られてラップされた整理されていないコードのブロックを見たら、Google検索のためのマジックワードは"ヒアドキュメント(here-doc)"です。</p>
+                <p>like <code><a href="http://perldoc.jp/docs/perl/perlop.pod#Quote32and32Quote-like32Operators">&lt;&lt;EOF</a></code>のように、2つの山括弧で区切られてラップされた整理されていないコードのブロックを見たら、Google検索のためのマジックワードは"ヒアドキュメント(here-doc)"です。</p>
 	</li>
 	<li>
 		<p class="original">Warning! Many built-in functions can be called with no arguments, <strong>causing them to operate on <code>$_</code> instead</strong>. Hopefully this will help you understand formations like:</p>



perldocjp-cvs メーリングリストの案内
アーカイブの一覧に戻る