SvFAKE lexicals in scope for all of the sub
[p5sagit/p5-mst-13.2.git] / pod / perlop.pod
index 8af2d5b..f286c60 100644 (file)
@@ -336,17 +336,27 @@ by the current locale if C<use locale> is in effect.  See L<perllocale>.
 
 =head2 Bitwise And
 
-Binary "&" returns its operators ANDed together bit by bit.
+Binary "&" returns its operands ANDed together bit by bit.
 (See also L<Integer Arithmetic> and L<Bitwise String Operators>.)
 
+Note that "&" has lower priority than relational operators, so for example
+the brackets are essential in a test like
+
+       print "Even\n" if ($x & 1) == 0;
+
 =head2 Bitwise Or and Exclusive Or
 
-Binary "|" returns its operators ORed together bit by bit.
+Binary "|" returns its operands ORed together bit by bit.
 (See also L<Integer Arithmetic> and L<Bitwise String Operators>.)
 
-Binary "^" returns its operators XORed together bit by bit.
+Binary "^" returns its operands XORed together bit by bit.
 (See also L<Integer Arithmetic> and L<Bitwise String Operators>.)
 
+Note that "|" and "^" have lower priority than relational operators, so
+for example the brackets are essential in a test like
+
+       print "false\n" if (8 | 2) != 10;
+
 =head2 C-style Logical And
 
 Binary "&&" performs a short-circuit logical AND operation.  That is,
@@ -763,8 +773,8 @@ you may be burned some day.
 
 For constructs that do interpolate, variables beginning with "C<$>"
 or "C<@>" are interpolated.  Subscripted variables such as C<$a[3]> or
-C<$href->{key}[0]> are also interpolated, as are array and hash slices.
-But method calls such as C<$obj->meth> are not.
+C<< $href->{key}[0] >> are also interpolated, as are array and hash slices.
+But method calls such as C<< $obj->meth >> are not.
 
 Interpolating an array or slice interpolates the elements in order,
 separated by the value of C<$">, so is equivalent to interpolating