argra****@users*****
argra****@users*****
2012年 7月 4日 (水) 02:50:59 JST
Index: docs/perl/5.14.1/perlrequick.pod diff -u docs/perl/5.14.1/perlrequick.pod:1.1 docs/perl/5.14.1/perlrequick.pod:1.2 --- docs/perl/5.14.1/perlrequick.pod:1.1 Sun Jun 24 03:28:31 2012 +++ docs/perl/5.14.1/perlrequick.pod Wed Jul 4 02:50:59 2012 @@ -468,10 +468,9 @@ =end original Perl は一般的な文字クラスの略記法を持っています。 -(These -definitions are those that Perl uses in ASCII mode with the C</a> modifier. -See L<perlrecharclass/Backslash sequences> for details.) -(TBT) +(これらの定義は Perl が C</a> 修飾子によって ASCII モードを +使っているときのものです。 +詳しくは L<perlrecharclass/Backslash sequences> を参照してください。) =over 4 @@ -1013,15 +1012,14 @@ =end original -There are a few more things you might want to know about matching -operators. -The global modifier C<//g> allows the matching operator to match -within a string as many times as possible. In scalar context, -successive matches against a string will have C<//g> jump from match -to match, keeping track of position in the string as it goes along. -You can get or set the position with the C<pos()> function. -For example, -(TBT) +マッチング演算子について知りたいかもしれないことがあといくつかあります。 +グローバル修飾子 C<//g> は一つの文字列に出来るだけ何回もマッチングすることを +許します。 +スカラコンテキストでは、文字列に対するマッチングの成功によって +C<//g> はマッチングからマッチングにジャンプし、文字列の位置を記録し続けて +いきます。 +C<pos()> 関数を使って位置を取得または設定できます。 +例えば: $x = "cat dog house"; # 3 words while ($x =~ /(\w+)/g) { @@ -1156,10 +1154,8 @@ =end original -The non-destructive modifier C<s///r> causes the result of the substitution -to be returned instead of modifying C<$_> (or whatever variable the -substitute was bound to with C<=~>): -(TBT) +非破壊修飾子 C<s///r> は C<$_> (または C<=~> によって置換されることになる +変数) を変更する代わりに、置換の結果を返します: $x = "I like dogs."; $y = $x =~ s/dogs/cats/r; @@ -1330,7 +1326,7 @@ =begin meta Translate: SHIRAKATA Kentaro <argra****@ub32*****> -Status: in progress +Status: completed =end meta