From: John Macdonald Date: Mon, 7 Apr 1997 13:21:29 +0000 (+1200) Subject: patch to 5.004_01 perltrap.pod X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8dbef6988b4d46823e28b4caabe5a76ed664f7aa;p=p5sagit%2Fp5-mst-13.2.git 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 --- diff --git a/pod/perltrap.pod b/pod/perltrap.pod index 786dcda..7ba57d0 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.