X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pod%2Fperlop.pod;h=40ea2c8e9ccdb2b15b3418b8a48fd1c9e38a50b5;hb=be5387481edebd42425976c372ac3dbafe134bde;hp=52ecddc4e8ee2a4a763dcaf647099a606553bcda;hpb=87e95b7ff3268cc4f947098ed09d244372b3af0d;p=p5sagit%2Fp5-mst-13.2.git
diff --git a/pod/perlop.pod b/pod/perlop.pod
index 52ecddc..40ea2c8 100644
--- a/pod/perlop.pod
+++ b/pod/perlop.pod
@@ -53,7 +53,7 @@ values only, not array values.
nonassoc list operators (rightward)
right not
left and
- left or xor err
+ left or xor
In the following sections, these operators are covered in precedence order.
@@ -200,7 +200,7 @@ concatenated with the identifier is returned. Otherwise, if the string
starts with a plus or minus, a string starting with the opposite sign
is returned. One effect of these rules is that -bareword is equivalent
to the string "-bareword". If, however, the string begins with a
-non-alphabetic character (exluding "+" or "-"), Perl will attempt to convert
+non-alphabetic character (excluding "+" or "-"), Perl will attempt to convert
the string to a numeric and the arithmetic negation is performed. If the
string cannot be cleanly converted to a numeric, Perl will give the warning
B.
@@ -260,9 +260,11 @@ X<*>
Binary "/" divides two numbers.
X> X
-Binary "%" computes the modulus of two numbers. Given integer
+Binary "%" is the modulo operator, which computes the division
+remainder of its first argument with respect to its second argument.
+Given integer
operands C<$a> and C<$b>: If C<$b> is positive, then C<$a % $b> is
-C<$a> minus the largest multiple of C<$b> that is not greater than
+C<$a> minus the largest multiple of C<$b> less than or equal to
C<$a>. If C<$b> is negative, then C<$a % $b> is C<$a> minus the
smallest multiple of C<$b> that is not less than C<$a> (i.e. the
result will be less than or equal to zero). If the operands
@@ -273,14 +275,14 @@ the integer portion of C<$a> and C<$b> will be used in the operation
If the absolute value of the right operand (C) is greater than
or equal to C<(UV_MAX + 1)>, "%" computes the floating-point remainder
C<$r> in the equation C<($r = $a - $i*$b)> where C<$i> is a certain
-integer that makes C<$r> should have the same sign as the right operand
+integer that makes C<$r> have the same sign as the right operand
C<$b> (B as the left operand C<$a> like C function C)
and the absolute value less than that of C<$b>.
Note that when C
This operator quotes (and possibly compiles) its I as a regular
expression. I is interpolated the same way as I
in C. If "'" is used as the delimiter, no interpolation
is done. Returns a Perl value which may be used instead of the
-corresponding C expression.
+corresponding C expression. The returned value is a
+normalized version of the original pattern. It magically differs from
+a string containing the same characters: C[ returns "Regexp",
+even though dereferencing the result returns undef.
For example,
$rex = qr/my.STRING/is;
+ print $rex; # prints (?si-xm:my.STRING)
s/$rex/foo/;
is equivalent to
@@ -1117,7 +1132,7 @@ for a detailed look at the semantics of regular expressions.
=item m/PATTERN/msixpogc
X X
X X X X
-X X X X X X
+X X X X X X X X
=item /PATTERN/msixpogc
@@ -1130,18 +1145,20 @@ rather tightly.) See also L. See L for
discussion of additional considerations that apply when C]