argra****@users*****
argra****@users*****
2018年 1月 16日 (火) 03:44:11 JST
Index: docs/perl/5.22.1/perlop.pod diff -u docs/perl/5.22.1/perlop.pod:1.1 docs/perl/5.22.1/perlop.pod:1.2 --- docs/perl/5.22.1/perlop.pod:1.1 Tue Mar 28 23:40:49 2017 +++ docs/perl/5.22.1/perlop.pod Tue Jan 16 03:44:11 2018 @@ -539,11 +539,10 @@ =end original -Note that certain exponentiation expressions are ill-defined: -these include C<0**0>, C<1**Inf>, and C<Inf**0>. Do not expect -any particular results from these special cases, the results -are platform-dependent. -(TBT) +一部の指数表現は明確に定義されていません: +これは C<0**0>, C<1**Inf>, C<Inf**0> などです。 +これらの特殊な場合に関して特定の結果を想定しないでください; +結果はプラットフォーム依存です。 =head2 Symbolic Unary Operators X<unary operator> X<operator, unary> @@ -642,13 +641,13 @@ =end original -If the experimental "bitwise" feature is enabled via S<C<use feature -'bitwise'>>, then unary C<"~"> always treats its argument as a number, and an -alternate form of the operator, C<"~.">, always treats its argument as a -string. So C<~0> and C<~"0"> will both give 2**32-1 on 32-bit platforms, -whereas C<~.0> and C<~."0"> will both yield C<"\xff">. This feature -produces a warning unless you use S<C<no warnings 'experimental::bitwise'>>. -(TBT) +実験的な "bitwise" 機能が S<C<use feature 'bitwise'>> で有効にされると、 +単項の C<"~"> は常にその引数を数値として扱い、その代替形式である +C<"~."> はその引数を常に文字列として扱います。 +従って 32 ビットプラットフォームでは C<~0> と C<~"0"> はどちらも +2**32-1 を意味しますが、C<~.0> と C<~."0"> はどちらも C<"\xff"> になります。 +S<C<no warnings 'experimental::bitwise'>> を使わない限り、この機能は警告を +発生させます。 =begin original @@ -1326,9 +1325,8 @@ =end original -For case-insensitive comparisions, look at the L<perlfunc/fc> case-folding -function, available in Perl v5.16 or later: -(TBT) +大文字小文字を無視した比較に関しては、Perl v5.16 以降で利用可能な +L<perlfunc/fc> 大文字小文字畳み込み関数を参照してください: if ( fc($x) eq fc($y) ) { ... } @@ -2005,11 +2003,10 @@ =end original -If the experimental "bitwise" feature is enabled via S<C<use feature -'bitwise'>>, then this operator always treats its operand as numbers. This -feature produces a warning unless you also use C<S<no warnings -'experimental::bitwise'>>. -(TBT) +S<C<use feature 'bitwise'>> によって実験的な "bitwise" 機能が +有効になっている場合、この演算子はオペランドを常に数値として扱います。 +この機能は、C<S<no warnings 'experimental::bitwise'>> と共に使っていない限り +警告が出力されます。 =head2 Bitwise Or and Exclusive Or X<operator, bitwise, or> X<bitwise or> X<|> X<operator, bitwise, xor> @@ -2069,11 +2066,10 @@ =end original -If the experimental "bitwise" feature is enabled via S<C<use feature -'bitwise'>>, then this operator always treats its operand as numbers. This -feature produces a warning unless you also use S<C<no warnings -'experimental::bitwise'>>. -(TBT) +S<C<use feature 'bitwise'>> によって実験的な "bitwise" 機能が +有効になっている場合、この演算子はオペランドを常に数値として扱います。 +この機能は、S<C<no warnings 'experimental::bitwise'>> と共に使っていない限り +警告が出力されます。 =head2 C-style Logical And X<&&> X<logical and> X<operator, logical, and> @@ -2762,12 +2758,10 @@ グループ分けしてありますが、これらはいずれも代入演算子として 同じ優先順位となっています。 -These combined assignment operators can only operate on -scalars, whereas the ordinary assignment operator can assign to arrays, -hashes, lists and even references. (See L<"Context"|perldata/Context> -and L<perldata/List value constructors>, and L<perlref/Assigning to -References>.) -(TBT) +これらの結合代入演算子はスカラとしてのみ動作しますが、一方 +通常の代入演算子は配列、スカラ、リスト、リファレンスに代入できます。 +(L<"Context"|perldata/Context>, L<perldata/List value constructors>, +L<perlref/Assigning to References> を参照してください。) =begin original @@ -2837,9 +2831,9 @@ =end original -The three dotted bitwise assignment operators (C<&.=> C<|.=> C<^.=>) are new in -Perl 5.22 and experimental. See L</Bitwise String Operators>. -(TBT) +三つのドット付きビット単位代入演算子 (C<&.=> C<|.=> C<^.=>) は +Perl 5.22 からの新しいもので実験的なものです。 +L</Bitwise String Operators> を参照してください。 =head2 Comma Operator X<comma> X<operator, comma> X<,> @@ -3575,9 +3569,8 @@ are the printable ASCII ones, minus the left brace C<"{">. 許されている他の文字を置いたときに起こることは、値が第 7 ビット; つまり 64 で xor を取ったものになり、 -, and a warning raised if -enabled. Using the non-allowed characters generates a fatal error. -(TBT) +有効の場合は警告が発生します。 +許されていない文字を使うと致命的エラーが発生します。 =begin original @@ -3651,10 +3644,9 @@ 3 桁にするために左側にゼロをパッディングするのを忘れないでください。 より大きな値では、C<\o{}> を使うか、代わりに 16 進数にして C<\N{U+}> -(which is portable between platforms with different character sets) -C<\x{}> を +(これは異なった文字集合のプラットフォーム間で移植性があります) を使うか、 +または C<\x{}> を 使うような、他のものに変換してください。 -(TBT) =item [8] @@ -4771,10 +4763,8 @@ 過去には、C<m?PATTERN?> の先頭の C<m> は省略可能でしたが、これを省略すると 廃止予定警告が出ていました。 -As of v5.22.0, omitting it produces a -syntax error. If you encounter this construct in older code, you can just add -C<m>. -(TBT) +v5.22.0 から、これを省略すると文法エラーが発生します。 +もし古いコードでこの構文に遭遇した場合は、単に C<m> を追加してください。 =item C<s/I<PATTERN>/I<REPLACEMENT>/msixpodualngcer> X<substitute> X<substitution> X<replace> X<regexp, replace> @@ -5430,13 +5420,14 @@ =end original -Characters may be literals or any of the escape sequences accepted in -double-quoted strings. But there is no interpolation, so C<"$"> and -C<"@"> are treated as literals. A hyphen at the beginning or end, or -preceded by a backslash is considered a literal. Escape sequence -details are in L<the table near the beginning of this section|/Quote and -Quote-like Operators>. It is a bug in Perl v5.22 that something like -(TBT) +文字はリテラルか、ダブルクォート文字列の中で受け入れられる +エスケープシーケンスです。 +しかし変数展開は行われないので、C<"$"> と C<"@"> はリテラルとして扱われます。 +先頭、末尾、および逆スラッシュが前置されたハイフンはリテラルとして扱われます。 +エスケープシーケンスの詳細は +L<the table near the beginning of this section|/Quote and +Quote-like Operators> にあります。 +Perl v5.22 にはバグがあり、次のようなものは tr/\N{U+20}-\N{U+7E}foobar// @@ -5446,8 +5437,7 @@ =end original -does not treat that range as fully Unicode. -(TBT) +完全な Unicode の範囲として扱われません。 =begin original @@ -6986,12 +6976,12 @@ =end original -Using double angle brackets inside of a while causes the open to use the -three argument form (with the second argument being C<< < >>), so all -arguments in C<ARGV> are treated as literal filenames (including C<"-">). -(Note that for convenience, if you use C<< <<>> >> and if C<@ARGV> is -empty, it will still read from the standard input.) -(TBT) +while の中で二重角かっこを使うと、 +3 引数型式 (かつ 2 番目の引数が C<< < >> の) open を引き起こすので、 +C<ARGV> の全ての引数は (C<"-"> を含めて) リテラル名ファイル名として +扱われます。 +(便宜のため、C<< <<>> >> を使って C<@ARGV> が空の場合、標準入力から +読み込みます。) =begin original @@ -7385,15 +7375,14 @@ =end original -This somewhat unpredictable behavior can be avoided with the experimental -"bitwise" feature, new in Perl 5.22. You can enable it via S<C<use feature -'bitwise'>>. By default, it will warn unless the C<"experimental::bitwise"> -warnings category has been disabled. (S<C<use experimental 'bitwise'>> will -enable the feature and disable the warning.) Under this feature, the four -standard bitwise operators (C<~ | & ^>) are always numeric. Adding a dot -after each operator (C<~. |. &. ^.>) forces it to treat its operands as -strings: -(TBT) +この、いくらか予測の難しい振る舞いは、Perl 5.22 で導入された実験的な +"bitwise" 機能で避けることができます。 +デフォルトでは、C<"experimental::bitwise"> 警告カテゴリが無効化されない限り、 +警告が発生します。 +(S<C<use experimental 'bitwise'>> はこの機能を有効にして警告を無効にします。) +この機能の基では、四つのビット単位演算子 (C<~ | & ^>) は常に数値です。 +それぞれの演算子の後にピリオドを付ける (C<~. |. &. ^.>) ことで、 +そのオペランドを文字列として扱うことを強制します: use experimental "bitwise"; $foo = 150 | 105; # yields 255 (0x96 | 0x69 is 0xFF) @@ -7415,9 +7404,8 @@ =end original -The assignment variants of these operators (C<&= |= ^= &.= |.= ^.=>) -behave likewise under the feature. -(TBT) +この機能の基では、これらの演算子の亜種 (C<&= |= ^= &.= |.= ^.=>) も +同様に振る舞います。 =begin original @@ -7427,10 +7415,9 @@ =end original -The behavior of these operators is problematic (and subject to change) -if either or both of the strings are encoded in UTF-8 (see -L<perlunicode/Byte and Character Semantics>. -(TBT) +もし文字列のどちらか、または両方が UTF-8 でエンコードされている場合、 +これらの演算子の振る舞いには問題があります (そして変更予定です) +(L<perlunicode/Byte and Character Semantics> を参照してください)。 =begin original @@ -7721,7 +7708,7 @@ Translate: 吉村 寿人 <JAE00****@nifty*****> (5.000) Update: Kentaro Shirakata <argra****@ub32*****> (5.6.1-) -Status: in progress +Status: completed =end meta