summaryrefslogtreecommitdiff
path: root/pod/perltrap.pod
diff options
context:
space:
mode:
authorJohn Macdonald <jmm@revenge.elegant.com>1997-04-08 01:21:29 +1200
committerTim Bunce <Tim.Bunce@ig.co.uk>1997-08-07 00:00:00 +1200
commit8dbef6988b4d46823e28b4caabe5a76ed664f7aa (patch)
treefc03e7e4d6224278a0f066d6f7379bcb2e812359 /pod/perltrap.pod
parentbb32b41a1664739c880b279946697979bfd57ab1 (diff)
downloadperl-8dbef6988b4d46823e28b4caabe5a76ed664f7aa.tar.gz
patch to 5.004_01 perltrap.pod
I noticed that one entry was repeated, and the description for both didn't really describe the full nature of the trap. p5p-msgid: 9706231525.AA22790@revenge.elegant.com
Diffstat (limited to 'pod/perltrap.pod')
-rw-r--r--pod/perltrap.pod16
1 files changed, 3 insertions, 13 deletions
diff --git a/pod/perltrap.pod b/pod/perltrap.pod
index 786dcda607..7ba57d0c70 100644
--- a/pod/perltrap.pod
+++ b/pod/perltrap.pod
@@ -923,7 +923,9 @@ Perl4-to-Perl5 traps involving precedence order.
=item * Precedence
-LHS vs. RHS when both sides are getting an op.
+LHS vs. RHS of any assignment operator. LHS is evaluated first
+in perl4, second in perl5; this can affect the relationship
+between side-effects in sub-expressions.
@arr = ( 'left', 'right' );
$a{shift @arr} = shift @arr;
@@ -999,18 +1001,6 @@ concatenation precedence over filetest operator?
# perl4 prints: no output
# perl5 prints: Can't modify -e in concatenation
-=item * Precedence
-
-Assignment to value takes precedence over assignment to key in
-perl5 when using the shift operator on both sides.
-
- @arr = ( 'left', 'right' );
- $a{shift @arr} = shift @arr;
- print join( ' ', keys %a );
-
- # perl4 prints: left
- # perl5 prints: right
-
=back
=head2 General Regular Expression Traps using s///, etc.