Configure megamaintenance. Cppsym (hopefully) final spasms;
[p5sagit/p5-mst-13.2.git] / pod / perlop.pod
index c430dbc..68113b7 100644 (file)
@@ -169,11 +169,11 @@ search or modify the string $_ by default.  This operator makes that kind
 of operation work on some other string.  The right argument is a search
 pattern, substitution, or transliteration.  The left argument is what is
 supposed to be searched, substituted, or transliterated instead of the default
-$_.  The return value indicates the success of the operation.  (If the
+$_.  The return value indicates the success of the operation.  If the
 right argument is an expression rather than a search pattern,
 substitution, or transliteration, it is interpreted as a search pattern at run
-time.  This can be is less efficient than an explicit search, because the
-pattern must be compiled every time the expression is evaluated).
+time.  This can be less efficient than an explicit search, because the
+pattern must be compiled every time the expression is evaluated.
 
 Binary "!~" is just like "=~" except the return value is negated in
 the logical sense.
@@ -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
 
@@ -963,7 +963,7 @@ notably if the result of qr() is used standalone:
        my @compiled = map qr/$_/i, @$patterns;
        grep {
            my $success = 0;
-           foreach my $pat @compiled {
+           foreach my $pat (@compiled) {
                $success = 1, last if /$pat/;
            }
            $success;
@@ -1802,6 +1802,17 @@ 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 Version tuples
+
+A version number of the form C<v1.2.3.4> is parsed as a dual-valued literal.
+It has the string value of C<"\x{1}\x{2}\x{3}\x{4}"> (i.e., a utf8 string)
+and a numeric value of C<1 + 2/1000 + 3/1000000 + 4/1000000000>.  This is
+useful for representing and comparing version numbers.
+
+Version tuples are accepted by both C<require> and C<use>.  The C<$^V> variable
+contains the running Perl interpreter's version in this format.
+See L<perlvar/$^V>.
+
 =head2 Integer Arithmetic
 
 By default, Perl assumes that it must do most of its arithmetic in
@@ -1889,3 +1900,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