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

Back to archive index

ktats****@users***** ktats****@users*****
2014年 4月 17日 (木) 10:29:38 JST


Index: docs/articles/qntm.org/files/perl/perl.html
diff -u docs/articles/qntm.org/files/perl/perl.html:1.18 docs/articles/qntm.org/files/perl/perl.html:1.19
--- docs/articles/qntm.org/files/perl/perl.html:1.18	Thu Apr 17 10:08:02 2014
+++ docs/articles/qntm.org/files/perl/perl.html	Thu Apr 17 10:29:38 2014
@@ -38,8 +38,7 @@
 
 	<!-- http://fonts.googleapis.com/css?family=Ubuntu+Mono:400,700|Roboto+Slab:400,700 -->
 
-        <script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js"></script>
-	<body onload="prettyPrint();return true;">
+	<body>
 <h1 class="original">Learn Perl in about 2 hours 30 minutes</h1>
 <h1>2時間半で学ぶPerl</h1>
 <h2><a href="http://qntm.org/perl">By Sam Hughes</a>, translated by <a href="http://d.hatena.ne.jp/ktat/">Kato Atsusi</a></h2>
@@ -91,11 +90,11 @@
 <p>Perl<i>スクリプト</i>は<code>.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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 use strict;
 use warnings;
 
-<a href="http://perldoc.jp/fund/print">print</a> "Hello world";
+<a href="http://perldoc.jp/func/print">print</a> "Hello world";
 </pre>
 <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>
@@ -136,7 +135,7 @@
 	<li>他の変数へのリファレンス</li>
 </ul>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $undef = undef;
 print $undef; # prints the empty string "" and raises a warning
 
@@ -145,12 +144,12 @@
 print $undef2; # prints "" and raises exactly the same warning
 </pre>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $num = 4040.5;
 print $num; # "4040.5"
 </pre>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $string = "world";
 print $string; # "world"
 </pre>
@@ -160,7 +159,7 @@
 
 <p class="original">String concatenation using the <code>.</code> operator (same as PHP):</p>
 <p>文字列の連結には<code>.</code>演算子を使います(PHPと同じ):</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print "Hello ".$string; # "Hello world"
 </pre>
 
@@ -186,7 +185,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $str1 = "4G";
 my $str2 = "4H";
 
@@ -206,7 +205,7 @@
 # String operators:    <a href="http://perldoc.perl.org/perlop.html#Equality-Operators">lt, gt, le, ge, eq, ne, cmp</a>, <a href="http://perldoc.perl.org/perlop.html#Multiplicative-Operators">.</a>, <a href="http://perldoc.perl.org/perlop.html#Multiplicative-Operators">x</a>
 </pre>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 # 数字用の演算子:  &lt;,  &gt;, &lt;=, &gt;=, ==, !=, &lt;=&gt;
 # 文字用の演算子:     <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>
@@ -228,7 +227,7 @@
 );
 </pre>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my @array = (
 	"print",
 	"these",
@@ -243,7 +242,7 @@
 
 <p>配列から値にアクセスするときにはドル記号を使わなければいけません。<em>取られる</em>値は配列ではなく、スカラだからです:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print $array[0]; # "print"
 print $array[1]; # "these"
 print $array[2]; # "strings"
@@ -256,7 +255,7 @@
 <p class="original">You can use negative indices to retrieve entries starting from the end and working backwards:</p>
 <p>負のインデックスを、後ろから値を取るのに使えます。逆向きになります:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print $array[-1]; # "me"
 print $array[-2]; # "for"
 print $array[-3]; # "out"
@@ -273,7 +272,7 @@
 <p class="original">To get an array's length:</p>
 <p>配列の長さを得るには:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print "This array has ".(scalar @array)."elements"; # "This array has 6 elements"
 print "The last populated index is ".$#array;       # "The last populated index is 5"
 </pre>
@@ -283,7 +282,7 @@
 
 <p class="original">Variables can be interpolated into strings:</p>
 <p>変数を文字列の間に入れることができます:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print "Hello $string"; # "Hello world"
 print "@array";        # "print these strings out for me"
 </pre>
@@ -291,7 +290,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print "Hello \$string"; # "Hello $string"
 print 'Hello $string';  # "Hello $string"
 print "\@array";        # "@array"
@@ -304,7 +303,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my %scientists = (
 	"Newton"   =&gt; "Isaac",
 	"Einstein" =&gt; "Albert",
@@ -325,7 +324,7 @@
 print $scientists{"Dyson"};    # returns undef, prints "" and raises a warning
 </pre>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print $scientists{"Newton"};   # "Isaac"
 print $scientists{"Einstein"}; # "Albert"
 print $scientists{"Darwin"};   # "Charles"
@@ -339,7 +338,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my @scientists = %scientists;
 </pre>
 
@@ -347,14 +346,14 @@
 
 <p>ですが、配列とは違い、ハッシュのキーは<em>順番がありません</em>。より効率的な順番で返ってきます。そのため、整列され直された<em>順番</em>に気をつけてください。しかし、結果の配列の<em>ペア</em>は保持されます:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 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>要点をまとめると、配列から値を取り出すのには<strong>四角いブラケット</strong>を使わなければいけませんが、ハッシュから値を取り出すのは<strong>ブレース</strong>を使わなければいけません。提供される<em>インデックス</em>が数字であるか文字列であるということには、重要性はありません:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $data = "orange";
 my @data = ("purple");
 my %data = ( "0" =&gt; "blue");
@@ -372,7 +371,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 (
 	"print",
 	"these",
@@ -394,7 +393,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 ("one", 1, "three", 3, "five", 5)
 ("one" =&gt; 1, "three" =&gt; 3, "five" =&gt; 5)
 </pre>
@@ -402,7 +401,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 ()
 </pre>
 
@@ -410,7 +409,7 @@
 
 <p>なんのヒントも存在しません。このリストは空の配列として宣言されているのでしょうか、それとも、カラのハッシュとしてでしょうか。<code>perl</code>インタープリタには、明らかにどちらとも判断することができません。Perlの変わった一面であると理解したなら、次の事実が真であることもまた理解するでしょう: <strong>リストの値はネストできません。</strong> 試してみてください:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my @array = (
 	"apples",
 	"bananas",
@@ -458,7 +457,7 @@
 print $hash{"eat"};     # undef, so prints "" and raises a warning
 </pre>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my %hash = (
 	"beer" =&gt; "good",
 	"bananas" =&gt; (
@@ -478,7 +477,7 @@
 <p class="original">Of course, this does make it easy to concatenate multiple arrays together:</p>
 <p>もちろん、このことは複数の配列を一緒にしやすくしています:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my @bones   = ("humerus", ("jaw", "skull"), "tibia");
 my @fingers = ("thumb", "index", "middle", "ring", "little");
 my @parts   = (@bones, @fingers, ("foot", "toes"), "eyeball", "knuckle");
@@ -499,13 +498,13 @@
 
 <p><code>$scalar =</code>のようなスカラの割り当てはスカラコンテキストとして評価されます。このケースでは、この式は<code>"Mendeleev"</code>と、返される値は<code>"Mendeleev"</code>と同じスカラになります:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 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><code>@array =</code> や <code>%hash =</code> のような配列やハッシュの割り当ては、リストコンテキストで評価されます。リストの値はリストコンテキストで評価され、リストを返します。配列やハッシュに代入するようなときです:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my @array = ("Alpha", "Beta", "Gamma", "Pie");
 my %hash = ("Alpha" =&gt; "Beta", "Gamma" =&gt; "Pie");
 </pre>
@@ -516,25 +515,25 @@
 <p class="original">A scalar expression evaluated in list context turns into a single-element list:</p>
 <p>スカラの式はリストコンテキストで評価されると、ひとつの値のリストとなります:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 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>リストの式がスカラコンテキストで評価されると、<em>リストの最後のスカラ</em>を返します:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 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>配列の式(配列はリストと違います。覚えてる?)は、スカラコンテキストでは<em>配列の長さ</em>を返します:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my @array = ("Alpha", "Beta", "Gamma", "Pie");
 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.jp/func/print">print</a></code> 組込関数は全ての引数をリストコンテキストで評価します。<code>print</code>は無制限のリストの引数を受取り、一つ一つ出力します。つまり、配列を直接与えることが出来ます。</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my @array = ("Alpha", "Beta", "Goo");
 my $scalar = "-X-";
 print @array;              # "AlphaBetaGoo";
@@ -552,7 +551,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my @outer = ("Sun", "Mercury", "Venus", undef, "Mars");
 my @inner = ("Earth", "Moon");
 
@@ -569,14 +568,14 @@
 
 <p class="original">A reference is created using a backslash.</p>
 <p>リファレンスはバックスラッシュを使って作られます。</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 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>いつでも、変数の名前を使えます。代わりにブレースを置いて、ブレース内に変数への<em>リファレンス</em>を置きます。</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print $colour;         # "Indigo"
 print $scalarRef;      # e.g. "SCALAR(0x182c180)"
 print ${ $scalarRef }; # "Indigo"
@@ -585,14 +584,14 @@
 <p class="original">As long as the result is not ambiguous, you can omit the braces too:</p>
 <p>結果が曖昧でない限り、ブレースを省略することもできます:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 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>リファレンスが配列かハッシュ変数のリファレンスの場合、ブレースかより一般的なアロー演算子、<code>-&gt;</code>を使ってデータを取り出せます:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my @colours = ("Red", "Orange", "Yellow", "Green", "Blue");
 my $arrayRef = \@colours;
 
@@ -614,7 +613,7 @@
 <p class="original">Here are four examples, but in practice the last one is the most useful.</p>
 <p>4つの例があります。ですが、実践的には、最後のものがもっとも有用です。</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my %owner1 = (
 	"name" =&gt; "Santa Claus",
 	"DOB"  =&gt; "1882-12-25",
@@ -643,7 +642,7 @@
 <p class="original">That's obviously unnecessarily laborious, because you can shorten it to:</p>
 <p>これは、明らかに不必要で骨の折れます。なぜなら、次のように省略できます:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my %owner1 = (
 	"name" =&gt; "Santa Claus",
 	"DOB"  =&gt; "1882-12-25",
@@ -666,7 +665,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 # Braces denote an anonymous hash
 my $owner1Ref = {
 	"name" =&gt; "Santa Claus",
@@ -691,7 +690,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my %account = (
 	"number" =&gt; "31415926",
 	"opened" =&gt; "3000-01-01",
@@ -715,7 +714,7 @@
 
 <p>さて、いじくりまわすために<code>%account</code>がまだあるとしましょう。ですが、全ての他のもの(他のものがあったなら)は、スコープの外に落ちます。それぞれのケースで同じ手順を逆向きにすることで、情報を表示できます。もう一度、4つの例がありますが、最後のものが一番有用です。</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $ownersRef = $account{"owners"};
 my @owners    = @{ $ownersRef };
 my $owner1Ref = $owners[0];
@@ -732,7 +731,7 @@
 <p class="original">Or, for short:</p>
 <p>または, 省略して:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my @owners = @{ $account{"owners"} };
 my %owner1 = %{ $owners[0] };
 my %owner2 = %{ $owners[1] };
@@ -746,7 +745,7 @@
 <p class="original">Or using references and the <code>-&gt;</code> operator:</p>
 <p>または、リファレンスと<code>-&gt;</code> を使って:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $ownersRef = $account{"owners"};
 my $owner1Ref = $ownersRef-&gt;[0];
 my $owner2Ref = $ownersRef-&gt;[1];
@@ -760,7 +759,7 @@
 <p class="original">And if we completely skip all the intermediate values:</p>
 <p>そして、全ての中間の値をスキップするなら:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print "Account #", $account{"number"}, "\n";
 print "Opened on ", $account{"opened"}, "\n";
 print "Joint owners:\n";
@@ -773,21 +772,21 @@
 
 <p class="original">This array has five elements:</p>
 <p>次の配列には5つの要素があります:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my @array1 = (1, 2, 3, 4, 5);
 print @array1; # "12345"
 </pre>
 
 <p class="original">This array, however, has ONE element (which happens to be a reference to an anonymous, five-element array):</p>
 <p>しかし、次の配列には*ひとつ*の要素(無名の5つの要素の配列のリファレンス)があります:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my @array2 = [1, 2, 3, 4, 5];
 print @array2; # e.g. "ARRAY(0x182c180)"
 </pre>
 
 <p class="original">This <em>scalar</em> is a reference to an anonymous, five-element array:</p>
 <p>次の <em>スカラ</em> は、無名の5つの要素の配列のリファレンスになります:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $array3Ref = [1, 2, 3, 4, 5];
 print $array3Ref;      # e.g. "ARRAY(0x22710c0)"
 print @{ $array3Ref }; # "12345"
@@ -802,7 +801,7 @@
 <p class="original">No surprises here, other than the spelling of <code>elsif</code>:</p>
 <p><code>elsif</code>のスペル以外には驚くものはありません:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $word = "antidisestablishmentarianism";
 my $strlen = <a href="http://perldoc.jp/func/length">length</a> $word;
 
@@ -818,13 +817,13 @@
 <p class="original">Perl provides a shorter "<i>statement</i> <code>if</code> <i>condition</i>" syntax which is highly recommended for <strong>short</strong> statements:</p>
 <p>Perlにはより短い "<i>ステートメント</i> <code>if</code> <i>条件</i>"のシンタックスがあります。<strong>短い</strong>ステートメント用に、強く推奨されます:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print "'", $word, "' is actually enormous" if $strlen >= 20;
 </pre>
 
 <h3><code>unless</code> ... <code>else</code> ...</h3>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $temperature = 20;
 
 unless($temperature > 30) {
@@ -840,7 +839,7 @@
 
 <p class="original">This, by comparison, is highly recommended because it is so easy to read:</p>
 <p>一方で、以下は読みやすさのために、強く推奨されます</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print "Oh no it's too cold" unless $temperature > 15;
 </pre>
 
@@ -850,7 +849,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $gain = 48;
 print "You gained ", $gain, " ", ($gain == 1 ? "experience point" : "experience points"), "!";
 </pre>
@@ -858,7 +857,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $lost = 1;
 print "You lost ", $lost, " t", ($lost == 1 ? "oo" : "ee"), "th!";
 </pre>
@@ -866,7 +865,7 @@
 <p class="original">Ternary operators may be nested:</p>
 <p>三項演算子はネストできます:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $eggs = 5;
 print "You have ", $eggs == 0 ? "no eggs" :
                    $eggs == 1 ? "an egg"  :
@@ -885,7 +884,7 @@
 <p class="original">Perl has a conventional <code>while</code> loop:</p>
 <p>Perlの慣例的な<code>while</code> ループ:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $i = 0;
 while($i &lt; scalar @array) {
 	print $i, ": ", $array[$i];
@@ -895,7 +894,7 @@
 
 <p class="original">Perl also offers the <code>until</code> keyword:</p>
 <p>Perlには<code>until</code>キーワードもあります:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $i = 0;
 until($i &gt;= scalar @array) {
 	print $i, ": ", $array[$i];
@@ -906,7 +905,7 @@
 <p class="original">These <code>do</code> loops are <em>almost</em> equivalent to the above (a warning would be raised if <code>@array</code> were empty):</p>
 <p>これらの<code>do</code>ループは、<em>ほとんど</em>上と同じです(<code>@array</code>が空の場合警告が起きます):</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $i = 0;
 do {
 	print $i, ": ", $array[$i];
@@ -917,7 +916,7 @@
 <p class="original">and</p>
 <p>そして</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $i = 0;
 do {
 	print $i, ": ", $array[$i];
@@ -928,7 +927,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 for(my $i = 0; $i &lt; scalar @array; $i++) {
 	print $i, ": ", $array[$i];
 }
@@ -937,7 +936,7 @@
 
 <p class="original">This kind of <code>for</code> loop is considered old-fashioned and should be avoided where possible. Native iteration over a list is much nicer. Note: unlike PHP, the <code>for</code> and <code>foreach</code> keywords are synonyms. Just use whatever looks most readable:</p>
 <p>この種の<code>for</code>ループは古臭いやり方なので、可能であれば避けるべきです。リストのネイティブのイテレーションはより簡単です。注意: PHPと違い、 <code>for</code> と <code>foreach</code> キーワードはシノニムです。もっとも読みやすいもののいずれかを使ってください:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 foreach my $string ( @array ) {
 	print $string;
 }
@@ -946,7 +945,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 foreach my $i ( 0 .. $#array ) {
 	print $i, ": ", $array[$i];
 }
@@ -955,7 +954,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 foreach my $key (keys %scientists) {
 	print $key, ": ", $scientists{$key};
 }
@@ -963,7 +962,7 @@
 
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 foreach my $key (sort keys %scientists) {
 	print $key, ": ", $scientists{$key};
 }
@@ -972,7 +971,7 @@
 <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 the <a href="http://perldoc.perl.org/perlvar.html">built-in variables</a>:</p>
 <p>明示的なイテレータを使わなければ、Perlはデフォルトのイテレータとして<code>$_</code>を使います。<code>$_</code>は最初の最もフレンドリーな<a href="http://perldoc.jp/docs/perl/perlvar.pod">組込の変数</a>です:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 foreach ( @array ) {
 	print $_;
 }
@@ -980,7 +979,7 @@
 
 <p class="original">If using the default iterator, and you only wish to put a single statement inside your loop, you can use the super-short loop syntax:</p>
 <p>デフォルトのイテレータを使うなら、ループに一つのステートメントしか置かないのなら、とても短いループのシンタックスを使えます:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print $_ foreach @array;
 </pre>
 
@@ -991,7 +990,7 @@
 
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 CANDIDATE: for my $candidate ( 2 .. 100 ) {
 	for my $divisor ( 2 .. <a href="http://perldoc.jp/func/sqrt">sqrt</a> $candidate ) {
 		next CANDIDATE if $candidate % $divisor == 0;
@@ -1010,42 +1009,42 @@
 
 <p><code>@stack</code>を使ってデモします:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my @stack = ("Fred", "Eileen", "Denise", "Charlie");
 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.jp/func/pop">pop</a></code> は配列の最後の要素を引き出して返します。スタックの上として考えられます:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 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://perldocjp/func/push">push</a></code> は追加の要素を配列の最後に付加します:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 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/func/shift">shift</a></code> は配列の最初の要素を引き出して返します:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 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.jp/func/unshift">unshift</a></code> 配列の最初に新しい要素を挿入します:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 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.jp/func/splice">splice</a></code>の特別なケースです。<code>splice</code> は、配列のスライスを削除して、返します。別の配列スライスでそれを置き換えます:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print splice(@stack, 1, 4, "&lt;&lt;&lt;", "&gt;&gt;&gt;"); # "GraceEileenDeniseBob"
 print @stack;                             # "Hank&lt;&lt;&lt;&gt;&gt;&gt;Alice"
 </pre>
@@ -1059,7 +1058,7 @@
 <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.jp/func/join">join</a></code> 関数は多くの文字列を一つに結合します:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my @elements = ("Antimony", "Arsenic", "Aluminum", "Selenium");
 print @elements;             # "AntimonyArsenicAluminumSelenium"
 print "@elements";           # "Antimony Arsenic Aluminum Selenium"
@@ -1068,7 +1067,7 @@
 
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print reverse("Hello", "World");        # "WorldHello"
 print reverse("HelloWorld");            # "HelloWorld"
 print scalar reverse("HelloWorld");     # "dlroWolleH"
@@ -1078,7 +1077,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my @capitals = ("Baton Rouge", "Indianapolis", "Columbus", "Montgomery", "Helena", "Denver", "Boise");
 
 print join ", ", map { uc $_ } @capitals;
@@ -1088,7 +1087,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print join ", ", grep { length $_ == 6 } @capitals;
 # "Helena, Denver"
 </pre>
@@ -1096,7 +1095,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print scalar grep { $_ eq "Columbus" } @capitals; # "1"
 </pre>
 
@@ -1106,7 +1105,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my @elevations = (19, 1, 2, 100, 3, 98, 100, 1056);
 
 print join ", ", sort @elevations;
@@ -1119,7 +1118,7 @@
 <p class="original">The <code>cmp</code> operator does exactly this for strings:</p>
 <p><code>cmp</code> 演算子は文字列に対して、まさにこれをします:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print join ", ", sort { $a cmp $b } @elevations;
 # "1, 100, 100, 1056, 19, 2, 3, 98"
 </pre>
@@ -1127,7 +1126,7 @@
 <p class="original">The "spaceship operator", <code>&lt;=&gt;</code>, does the same for numbers:</p>
 <p>"スペースシップ演算子", <code>&lt;=&gt;</code>は、数字に対して同じことをします:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print join ", ", sort { $a &lt;=&gt; $b } @elevations;
 # "1, 2, 3, 19, 98, 100, 100, 1056"
 </pre>
@@ -1135,7 +1134,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 sub comparator {
 	# lots of code...
 	# return -1, 0 or 1
@@ -1194,7 +1193,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 sub hyphenate {
 
   # Extract the first argument from the array, ignore everything else
@@ -1216,7 +1215,7 @@
 
 <p>全ての他の主要なプログラミング言語とは違い、Perlはリファレンスと呼びます。これは、サブルーチンの内側で利用可能な変数か値がオリジナルのコピーではないことを意味します。</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $x = 7;
 
 sub reassign {
@@ -1231,13 +1230,13 @@
 
 <p>次のようなものを試すと</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 reassign(8);
 </pre>
 
 <p>then an error occurs and execution halts, because the first line of <code>reassign()</code> is equivalent to</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 8 = 7;
 </pre>
 
@@ -1258,7 +1257,7 @@
 <p>例のサブルーチン<code>left_pad</code>は、以下の例は、渡された詰め込み文字を使って、必要な長さになるまで文字列に付加します。(<code>x</code>関数は行に同じ文字列の複数のコピーをつなげます)。(注意: 簡潔さのために、これらのサブルーチンは全て基本的なエラーチェックを行っていません。例えば、詰め込み文字が1文字のみであることを保証するとか、長さが既存の文字列の長さ以上であるか、必要な引数が全て渡されているかどうか、など)。</p>
 <p class="original"><code>left_pad</code> is typically invoked as follows:</p>
 <p><code>left_pad</code> は典型的に、次のように呼ばれます:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print left_pad("hello", 10, "+"); # "+++++hello"
 </pre>
 
@@ -1266,7 +1265,7 @@
 	<li>
 		<p class="original">Unpacking <code>@_</code> entry by entry is effective but not terribly pretty:</p>
   		<p>エントリによって、<code>@_</code>エントリを取り出すのは、効率的ですが、あまりよくありません:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 sub left_pad {
 	my $oldString = $_[0];
 	my $width     = $_[1];
@@ -1279,7 +1278,7 @@
 	<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><code>@_</code>を取り出すのに、<code>shift</code>を使って、@_からデータを削除するのは、引数が4つまでなら推奨されます:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 sub left_pad {
 	my $oldString = shift @_;
 	my $width     = shift @_;
@@ -1290,7 +1289,7 @@
 </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><code>shift</code>に配列を渡さなければ、暗黙に、<code>@_</code>に対して操作します。このアプローチはとてもよく見られます:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 sub left_pad {
 	my $oldString = shift;
 	my $width     = shift;
@@ -1305,7 +1304,7 @@
 	<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><code>@_</code>の取り出しを、同時に全て一度にスカラに割り当てることが出来ます。 この方法も、引数が4つまでなら問題ありません:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 sub left_pad {
 	my ($oldString, $width, $padChar) = @_;
 	my $newString = ($padChar x ($width - length $oldString)) . $oldString;
@@ -1316,12 +1315,12 @@
 	<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>引数が多いサブルーチンや、いくつかの引数がオプションであるとか、他との組み合わせで使えないなら、最も良い方法は、サブルーチンの呼び出し時に、ユーザにハッシュの引数を渡させることです。そして、<code>@_</code>をハッシュに取り出します。このアプローチのために、サブルーチンの呼び出しはちょっと違ったものになります:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print left_pad("oldString" =&gt; "pod", "width" =&gt; 10, "padChar" =&gt; "+");
 </pre>
 		<p class="original">And the subroutine itself looks like this:</p>
 		<p>そして、サブルーチン自身は次のようになります:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 sub left_pad {
 	my %args = @_;
 	my $newString = ($args{"padChar"} x ($args{"width"} - length $args{"oldString"})) . $args{"oldString"};
@@ -1336,7 +1335,7 @@
 
 <p>他のPerlの式と同様、サブルーチン呼び出しは、コンテキスト依存の振る舞いをします。<code><a href="http://perldoc.jp/func/wantarray">wantarray</a></code>を使うことができます(<code>wantlist</code>と呼ばれるべきですが、気にしないでください)を使って、どのコンテキストでサブルーチンが評価されているかをチェックでき、コンテキストに適した結果を返すことが出来ます:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 sub contextualSubroutine {
 	# Caller wants a list. Return a list
 	return ("Everest", "K2", "Etna") if wantarray;
@@ -1361,20 +1360,20 @@
 <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><a href="http://perldoc.perl.org/functions/system.html">system</a></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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $rc = system "perl", "anotherscript.pl", "foo", "bar", "baz";
 $rc >>= 8;
 print $rc; # "37"
 </pre>
 <p class="original">Alternatively, you can use backticks <code>``</code> to run an actual command at the command line and capture the standard output from that command. In scalar context the entire output is returned as a single string. In list context, the entire output is returned as an array of strings, each one representing a line of output.</p>
 <p>代わりに、バッククォート<code>``</code>を使って、コマンドラインで実際のコマンドを走らせて、コマンドからの標準出力をキャプチャできます。スカラコンテキストでは、全ての出力は単一の文字列として帰ります。リストコンテキストでは、全ての出力は一行ずつの文字列の配列として返されます。</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $text = `perl anotherscript.pl foo bar baz`;
 print $text; # "foobarbaz"
 </pre>
 <p class="original">This is the behaviour which would be seen if <code>anotherscript.pl</code> contained, for example:</p>
 <p>これは、<code>anotherscript.pl</code>が含んでいたら、見られる振る舞いです。例:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 use strict;
 use warnings;
 
@@ -1391,7 +1390,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $f = "text.txt";
 my $result = open my $fh, "&lt;", $f;
 
@@ -1404,7 +1403,7 @@
 <p class="original">If successful, <code>open</code> returns a true value. Otherwise, it returns false and an error message is stuffed into the built-in variable <code>$!</code>. As seen above, you should always check that the <code>open</code> operation completed successfully. This checking being rather tedious, a common idiom is:</p>
 <p>成功すれば、<code>open</code>は真を返します。そうでなければ、偽を返し、エラーメッセージが組み込みの変数<code>$!</code>に入ります。上で見たように、<code>open</code> 演算子が完全に成功したかを常にチェックすべきです。このチェックの手続きは退屈ですが、よくみかけるイディオムは次のものです:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 open(my $fh, "&lt;", $f) || die "Couldn't open '".$f."' for reading because: ".$!;
 </pre>
 <p class="original">Note the need for parentheses around the <code>open</code> call's arguments.</p>
@@ -1413,7 +1412,7 @@
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 while(1) {
 	my $line = readline $fh;
 	last unless defined $line;
@@ -1422,7 +1421,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.jp/func/chomp">chomp</a></code>を使うと改行を取り除けます:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 chomp $line;
 </pre>
 <p class="original">Note that <code>chomp</code> acts on <code>$line</code> in place. <code>$line = chomp $line</code> is probably not what you want.</p>
@@ -1430,7 +1429,7 @@
 
 <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.jp/func/eof">eof</a></code>を使ってファイルの終端を判断することもできます:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 while(!eof $fh) {
 	my $line = readline $fh;
 	# process $line...
@@ -1439,21 +1438,21 @@
 <p class="original">But beware of just using <code>while(my $line = readline $fh)</code>, because if <code>$line</code> turns out to be <code>"0"</code>, the loop will terminate early. If you want to write something like that, Perl provides the <code>&lt;&gt;</code> operator which wraps up <code>readline</code> in a fractionally safer way. This is very commonly-seen and perfectly safe:</p>
 <p>ですが、<code>while(my $line = readline $fh)</code>を使うのは注意してください。<code>$line</code>が<code>"0"</code>で合った場合、ループは早くに終わってしまいます。そのように書きたいのならば、Perlには<code>&lt;&gt;</code>演算子があり、少し安全な方法で<code>readline</code>をラップしています。次のものは、とてもよくある完全に安全なものです:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 while(my $line = &lt;$fh&gt;) {
 	# process $line...
 }
 </pre>
 <p class="original">And even:</p>
 <p>次のようにさえ:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 while(&lt;$fh&gt;) {
 	# process $_...
 }
 </pre>
 <p class="original">Writing to a file involves first opening it in a different mode. The mode <code>&gt;</code> indicates that we wish to open the file to write to it. (<code>&gt;</code> will clobber the content of the target file if it already exists and has content. To merely append to an existing file, use mode <code>&gt;&gt;</code>.) Then, simply provide the filehandle as a zeroth argument for the <code>print</code> function.</p>
 <p>ファイルに書き込む場合は、違ったモードで最初に開きます。モード <code>&gt;</code> は、書き込み用にファイルを開くことを指示します。(<code>&gt;</code>は、目的のファイルの中身を壊します。単純に、追加したい場合は、<code>&gt;&gt;</code> のモードを使います)。それから、<code>print</code>関数の0番目の引数として、ファイルハンドルを単に渡します。</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 open(my $fh2, "&gt;", $f) || die "Couldn't open '".$f."' for writing because: ".$!;
 print $fh2 "The eagles have left the nest";
 </pre>
@@ -1463,19 +1462,19 @@
 <p class="original">File handles are actually closed automatically when they drop out of scope, but otherwise:</p>
 <p>ファイルハンドルはスコープを抜けると自動的に閉じられます。もしくは、次のようにします:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 <a href="http://perldoc.jp/func/close">close</a> $fh2;
 close $fh;
 </pre>
 
 <p class="original">Three filehandles exist as global constants: <code>STDIN</code>, <code>STDOUT</code> and <code>STDERR</code>. These are open automatically when the script starts. To read a single line of user input:</p>
 <p>3つのファイルハンドルがグローバルな定数としてあります: <code>STDIN</code>と<code>STDOUT</code>と<code>STDERR</code>があります。これらはスクリプトが開始されたときに自動的に開かれます。ユーザーの入力を一行読むには:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $line = &lt;STDIN&gt;;
 </pre>
 <p class="original">To just wait for the user to hit Enter:</p>
 <p>ユーザーがエンターを押すまで待つだけです:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 &lt;STDIN&gt;;
 </pre>
 <p class="original">Calling <code>&lt;&gt;</code> with no filehandle reads data from <code>STDIN</code>, or from any files named in arguments when the Perl script was called.</p>
@@ -1488,7 +1487,7 @@
 
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 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>
@@ -1507,7 +1506,7 @@
 <p class="original">Match operations are performed using <code>=~ m//</code>. In scalar context, <code>=~ m//</code> returns true on success, false on failure.</p>
 <p>マッチは、マッチ演算子<code>=~ m//</code>を使ってされます。スカラコンテキストでは、<code>=~ m//</code>は、成功なら真を返し、失敗なら偽を返します。</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $string = "Hello world";
 if($string =~ m/(\w+)\s+(\w+)/) {
 	print "success";
@@ -1515,14 +1514,14 @@
 </pre>
 <p class="original">Parentheses perform sub-matches. After a successful match operation is performed, the sub-matches get stuffed into the built-in variables <code>$1</code>, <code>$2</code>, <code>$3</code>, ...:</p>
 <p>括弧はサブマッチになります。マッチが成功したら、サブマッチは組込変数の<code>$1</code>, <code>$2</code>, <code>$3</code>, ...にマッチしたものが入ります:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print $1; # "Hello"
 print $2; # "world"
 </pre>
 <p class="original">In list context, <code>=~ m//</code> returns <code>$1</code>, <code>$2</code>, ... as a list.</p>
 <p>リストコンテキストでは、<code>=~ m//</code> は<code>$1</code>, <code>$2</code>, ... をリストとして返します:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $string = "colourless green ideas sleep furiously";
 my @matches = $string =~ m/(\w+)\s+((\w+)\s+(\w+))\s+(\w+)\s+(\w+)/;
 
@@ -1532,7 +1531,7 @@
 
 <p class="original">Substitution operations are performed using <code>=~ s///</code>.</p>
 <p>置換操作は<code>=~ s///</code>で行います。</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $string = "Good morning world";
 $string =~ s/world/Vietnam/;
 print $string; # "Good morning Vietnam"
@@ -1546,7 +1545,7 @@
 <p class="original">In scalar context, each <code>=~ m//g</code> call finds another match after the previous one, returning true on success, false on failure. You can access <code>$1</code> and so on afterwards in the usual way. For example:</p>
 <p>スカラコンテキストでは、それぞれの<code>=~ m//g</code> 呼び出しは前のものの後の他のマッチを探し、成功すると真を返し、失敗すると値を返します。よくある方法で<code>$1</code>などにアクセス出来ます。 例:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $string = "a tonne of feathers or a tonne of bricks";
 while($string =~ m/(\w+)/g) {
   print "'".$1."'\n";
@@ -1555,7 +1554,7 @@
 
 <p class="original">In list context, an <code>=~ m//g</code> call returns all of the matches at once.</p>
 <p>リストコンテキストでは、<code>=~ m//g</code>呼び出しは、マッチしたものを一度に全部返します。</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my @matches = $string =~ m/(\w+)/g;
 print join ", ", map { "'".$_."'" } @matches;
 </pre>
@@ -1563,7 +1562,7 @@
 <p class="original">An <code>=~ s///g</code> call performs a global search/replace and returns the number of matches. Here, we replace all vowels with the letter "r".</p>
 <p><code>=~ s///g</code>呼び出しはグローバルな検索/置換でマッチした数を返します。ここでは、すべての母音を文字"r"に置換しています。</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 # Try once without /g.
 $string =~ s/[aeiou]/r/;
 print $string; # "r tonne of feathers or a tonne of bricks"
@@ -1581,7 +1580,7 @@
 <p><code>/i</code> フラグはマッチと置換をケースインセンシティブにします。</p>
 <p class="original">The <code>/x</code> flag allows your regular expression to contain whitespace (e.g., line breaks) and comments.</p>
 <p class="original"><code>/x</code>フラグは正規表現の中に空白(e.g. 改行)やコメントを含めることができるようにします。</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 "Hello world" =~ m/
   (\w+) # one or more word characters
   [ ]   # single literal space, stored inside a character class
@@ -1603,7 +1602,7 @@
 
 <p class="original">A <i>module</i> is a <code>.pm</code> file that you can <i>include</i> 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ファイル(スクリプトかモジュール)に<i>含める</i>ことが出来る<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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 use strict;
 use warnings;
 
@@ -1633,7 +1632,7 @@
 <p class="original">Once the Perl module is created and <code>perl</code> knows where to look for it, you can use the <code><a href="http://perldoc.perl.org/functions/require.html">require</a></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 executed, the subroutines that were defined there suddenly become available to 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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 use strict;
 use warnings;
 
@@ -1654,7 +1653,7 @@
 <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><a href="http://perldoc.perl.org/functions/package.html">package</a></code> built-in function:</p>
 <p><i>package</i>は名前空間で、その中で、サブルーチンを宣言できます。宣言したサブルーチンは、暗黙的に、現在のパッケージ内に宣言されます。実行の最初は、<code>main</code>パッケージになりますが、組込関数の<code>package</code>を使って、パッケージを切り替えられます:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 use strict;
 use warnings;
 
@@ -1676,7 +1675,7 @@
 <p class="original">Any time you call a subroutine, you implicitly call a subroutine which is inside the current package. Alternatively, you can explicitly provide a package. See what happens if we continue the above script:</p>
 <p>サブルーチンを呼んだときはいつでも、暗黙に現在のパッケージ内のサブルーチンを呼んでいます。代わりに、パッケージを明示的に書くこともできます。下のスクリプトを実行したら、何が起きるでしょうか:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 subroutine();                 # "kingedward"
 main::subroutine();           # "universe"
 Food::Potatoes::subroutine(); # "kingedward"
@@ -1685,7 +1684,7 @@
 <p class="original">So the logical solution to the problem described above is to modify <code>C:\foo\bar\baz\Demo\StringUtils.pm</code> or <code>/foo/bar/baz/Demo/StringUtils.pm</code> to read:</p>
 <p>ですので、上で述べた問題の論理的な解決策は<code>C:\foo\bar\baz\Demo\StringUtils.pm</code>か<code>/foo/bar/baz/Demo/StringUtils.pm</code>を変更することです:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 use strict;
 use warnings;
 
@@ -1703,7 +1702,7 @@
 <p class="original">And modify <code>main.pl</code> to read:</p>
 <p>そして、<code>main.pl</code>を変更します</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 use strict;
 use warnings;
 
@@ -1757,7 +1756,7 @@
 <p class="original">A quick example makes this clearer. An example module <code>Animal.pm</code> containing a class <code>Animal</code> reads like this:</p>
 <p>以下、簡単な例でそれをはっきりさせます。 例のモジュールとして<code>Animal.pm</code>のクラス<code>Animal</code>は、次のようになります:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 use strict;
 use warnings;
 
@@ -1787,7 +1786,7 @@
 <p class="original">And we might make use of this class like so:</p>
 <p>このクラスを使う次のように使うでしょう:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 require Animal;
 
 my $animal = {
@@ -1804,13 +1803,13 @@
 
 <p class="original">You can still work with the original hash in the usual way:</p>
 <p>まだ、通常のやり方でオリジナルのハッシュを操作できます</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print "Animal has ", $animal->{"legs"}, " leg(s)";
 </pre>
 
 <p class="original">But you can now also call methods on the object using the same <code>-&gt;</code> operator, like so:</p>
 <p>ですが、同じ<code>-&gt;</code>オペレータでオブジェクトからメソッドを呼ぶこともできます。次のようにします:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 $animal-&gt;eat("insects", "curry", "eucalyptus");
 </pre>
 <p class="original">This final call is equivalent to <code>Animal::eat($animal, "insects", "curry", "eucalyptus")</code>.</p>
@@ -1821,7 +1820,7 @@
 
 <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="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 use strict;
 use warnings;
 
@@ -1837,7 +1836,7 @@
 
 <p class="original">And then use it like so:</p>
 <p>次のように使います:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 my $animal = Animal-&gt;new();
 </pre>
 
@@ -1847,7 +1846,7 @@
 <p class="original">To create a class inheriting from a parent class, use <code>use parent</code>. Let's suppose we subclassed <code>Animal</code> with <code>Koala</code>, located at <code>Koala.pm</code>:</p>
 <p>ベースクラスから継承しているクラスを作るには、<code>use parent</code>を使います。<code>Animal</code>をサブクラス化して<code>Koala</code>でサブクラスを作るとします。場所は<code>Koala.pm</code>になります:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 use strict;
 use warnings;
 
@@ -1869,7 +1868,7 @@
 <p class="original">And some sample code:</p>
 <p>サンプルコード:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 use strict;
 use warnings;
 
@@ -1889,7 +1888,7 @@
 <p class="original">A <code><a href="http://perldoc.perl.org/functions/BEGIN.html">BEGIN</a></code> block is executed as soon as <code>perl</code> has finished parsing that block, even before it parses the rest of the file. It is ignored at execution time:</p>
 <p><code><a href="http://perldoc.jp/func/BEGIN">BEGIN</a></code>ブロックは<code>perl</code>がそのブロックをパースし終えるとすぐに実行されます。コンパイラがまだ全てをパースしていなくてもです。BEGINブロックは実行時には無視されます。</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 use strict;
 use warnings;
 
@@ -1906,7 +1905,7 @@
 <p class="original">A <code>BEGIN</code> block is executed as soon as the block has been parsed. Once this is done, <em>parsing</em> resumes at the end of the <code>BEGIN</code> block. Only once the whole script or module has been parsed is any of the code outside of <code>BEGIN</code> blocks executed.</p>
 <p><code>BEGIN</code>ブロックはそのブロックが解釈されたと同時に実行されます。一度実行されると、<em>コードのパース</em>は<code>BEGIN</code>ブロックの終わりで再開されます。一度スクリプト全体かモジュールがパースされていれば、<code>BEGIN</code>ブロックの外側のいずれかが実行されます。
 </p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 use strict;
 use warnings;
 
@@ -1922,7 +1921,7 @@
 </pre>
 <p class="original">Because they are executed at compilation time, a <code>BEGIN</code> block placed inside a conditional block will <em>still</em> be executed first, even if the conditional evaluates to false and despite the fact that the conditional <em>has not been evaluated at all yet</em> and in fact <em>may never be evaluated</em>.</p>
 <p>コンパイル時に実行されるので、<code>BEGIN</code>ブロックが条件ブロックの中にあっても、<em>まだ</em>最初に実行されます。たとえ、条件の評価が偽であり、条件が<em>まだまったく評価されていない</em>にもかかわらず、実際には、<em>評価されることがない</em>としてもです。</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 if(0) {
        BEGIN {
                print "This will definitely get printed";
@@ -1933,7 +1932,7 @@
 <p class="original"><strong>Do not put <code>BEGIN</code> blocks in conditionals!</strong> If you want to do something conditionally at compile time, you need to put the conditional <em>inside</em> the <code>BEGIN</code> block:</p>
 <p>
 <strong><code>BEGIN</code>ブロックを条件の中に置いては行けません!</strong> コンパイル時に何かしらの条件付きのことがしたければ、<code>BEGIN</code>ブロックの<em>中に</em>条件文を置かなければなりません:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 BEGIN {
 	if($condition) {
 		# etc.
@@ -1946,14 +1945,14 @@
 <p>いいでしょう。もうわかりにくい、パッケージ、モジュールクラスメソッドと<code>BEGIN</code>ブロックの意味を理解したので、よく見かける<code><a href="http://perldoc.jp/func/use">use</a></code>関数について説明できます。</p>
 <p class="original">The following three statements:</p>
 <p>以下の3つのステートメントは:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 use Caterpillar ("crawl", "pupate");
 use Caterpillar ();
 use Caterpillar;
 </pre>
 <p class="original">are respectively equivalent to:</p>
 <p>以下とそれぞれ等価です:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 BEGIN {
 	require Caterpillar;
 	Caterpillar-&gt;import("crawl", "pupate");
@@ -1988,7 +1987,7 @@
 <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>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 use strict;
 use warnings;
 
@@ -2011,7 +2010,7 @@
 <p class="original">Another piece of code may then <code>import()</code> these subroutines by name, typically using a <code>use</code> statement:</p>
 <p>コードの別の部分が、名前でこれらのサブルーチンを<code>import()</code>するでしょう。典型的に、<code>use</code>ステートメントを使います:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 use strict;
 use warnings;
 
@@ -2026,7 +2025,7 @@
 <p class="original">Note: regardless of the content of <code>@EXPORT_OK</code>, every method can always be called "longhand":</p>
 <p>注意: <code>@EXPORT_OK</code>の内容は無視して、すべてのメソッドは、常に"longhand"で呼ぶこともできます:</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 use strict;
 use warnings;
 use Caterpillar (); # no subroutines named, no import() call made
@@ -2045,7 +2044,7 @@
 <p class="original">The Exporter module also defines a package variable called <code>@EXPORT</code>, which can also be populated with a list of subroutine names.</p>
 <p>Exporter モジュールは <code>@EXPORT</code>と呼ばれるパッケージ変数も定義します。ここにもサブルーチン名のリストを入れます。</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 use strict;
 use warnings;
 
@@ -2066,7 +2065,7 @@
 <p class="original">The subroutines named in <code>@EXPORT</code> are exported if <code>import()</code> is called with no arguments at all, which is what happens here:</p>
 <p><code>@EXPORT</code>に書かれたサブルーチンは <code>import()</code>が引数なしで呼ばれた場合にエクスポートされます。この例で起きることが起きます。</p>
 
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 use strict;
 use warnings;
 use Caterpillar; # calls import() with no arguments
@@ -2098,7 +2097,7 @@
 	<li>
 		<p class="original">There's an alternate syntax, <code>qw{ }</code>, for declaring arrays. This is often seen in <code>use</code> statements:</p>
 		<p>配列を宣言するための代わりのシンタックス、<code>qw{ }</code>があります。<code>use</code>ステートメントでよく見られます:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 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>
@@ -2123,7 +2122,7 @@
 	<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>
                 <p>注意! 多くの組込関数では、引数なしで呼ぶと<strong><code>$_</code>が代わりに渡されます</strong>。願わくば、次のような形を理解する助けになれば良いのですが:</p>
-<pre class="prittyprint lang-perl">
+<pre class="prettyprint lang-perl">
 print foreach @array;
 </pre>
 <p class="original">and</p>
@@ -2149,7 +2148,6 @@
 	var sc_remove_link=1; 
 // --></script>
 <script type="text/javascript" src="http://www.statcounter.com/counter/counter_xhtml.js"></script>
-
 <noscript>
 	<p><img
 		class="statcounter"
@@ -2157,5 +2155,6 @@
 		alt="website statistics"
 	/></p>
 </noscript>
+<script src="https://google-code-prettify.googlecode.com/svn/loader/run_prettify.js?autoload=true&skin=sunburst"></script>
 </body>
 </html> 



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