per Larry's idea, parse 1.2.3 as v1.2.3; C<require 5.6.0> and
[p5sagit/p5-mst-13.2.git] / pod / perlop.pod
index a7553df..bc6f2ce 100644 (file)
@@ -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</o> 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<qr//>.
+Perl won't even notice.  See also L<"qr//">.
 
 If the PATTERN evaluates to the empty string, the last
 I<successfully> matched regular expression is used instead.
@@ -1802,6 +1802,22 @@ operation you intend by using C<""> or C<0+>, as in the examples below.
 See L<perlfunc/vec> for information on how to manipulate individual bits
 in a bit vector.
 
+=head2 Strings of Character
+
+A literal of the form C<v1.20.300.4000> is parsed as a string composed
+of characters with the specified ordinals.  This provides an alternative,
+more readable way to construct strings, rather than use the somewhat less
+readable interpolation form C<"\x{1}\x{14}\x{12c}\x{fa0}">.  This is useful
+for representing Unicode strings, and for comparing version "numbers"
+using the string comparison operators, C<cmp>, C<gt>, C<lt> etc.
+
+If there are more than two dots in the literal, the leading C<v> may be
+omitted.
+
+Such literals are accepted by both C<require> and C<use> for doing a version
+check.  The C<$^V> special variable also contains the running Perl
+interpreter's version in this form.  See L<perlvar/$^V>.
+
 =head2 Integer Arithmetic
 
 By default, Perl assumes that it must do most of its arithmetic in
@@ -1889,3 +1905,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