From 8dbef6988b4d46823e28b4caabe5a76ed664f7aa Mon Sep 17 00:00:00 2001 From: John Macdonald Date: Tue, 8 Apr 1997 01:21:29 +1200 Subject: [PATCH] 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 --- pod/perltrap.pod | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) 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. -- 2.7.4