X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlop.pod;h=d9327046665063c270998a6a2f39f56431a64779;hb=bed171dfce7f6c0bdb7207be32c058f4d36fc432;hp=a7553dff42e694bd308114e5e2ff4c993df7d1e8;hpb=2decb4fb82e001e3c9671c57b61232c651a9c22c;p=p5sagit%2Fp5-mst-13.2.git diff --git a/pod/perlop.pod b/pod/perlop.pod index a7553df..d932704 100644 --- a/pod/perlop.pod +++ b/pod/perlop.pod @@ -362,7 +362,7 @@ With the C-style operators that would have been written like this: unlink("alpha", "beta", "gamma") || (gripe(), next LINE); -Use "or" for assignment is unlikely to do what you want; see below. +Using "or" for assignment is unlikely to do what you want; see below. =head2 Range Operators @@ -789,7 +789,7 @@ the trailing delimiter. This avoids expensive run-time recompilations, and is useful when the value you are interpolating won't change over the life of the script. However, mentioning C constitutes a promise that you won't change the variables in the pattern. If you change them, -Perl won't even notice. See also L. +Perl won't even notice. See also L<"qr//">. If the PATTERN evaluates to the empty string, the last I matched regular expression is used instead. @@ -1802,6 +1802,18 @@ operation you intend by using C<""> or C<0+>, as in the examples below. See L for information on how to manipulate individual bits in a bit vector. +=head2 Version tuples + +A literal of the form C is parsed as a dual-valued quantity. +It has the string value of C<"\x{1}\x{14}\x{12c}\x{fa0}"> (i.e., a UTF-8 +string) and a numeric value of C<1 + 20/1000 + 300/1000000 + 4000/1000000000>. +This is useful for representing Unicode strings, and for comparing version +numbers using the string comparison operators, C, C, C etc. + +Such "version tuples" or "vectors" are accepted by both C and +C. The C<$^V> variable contains the running Perl interpreter's +version in this format. See L. + =head2 Integer Arithmetic By default, Perl assumes that it must do most of its arithmetic in @@ -1889,3 +1901,5 @@ limited-precision representations. The non-standard modules SSLeay::BN and Math::Pari provide equivalent functionality (and much more) with a substantial performance savings. + +=cut