From: Jarkko Hietaniemi Date: Tue, 7 May 2002 02:49:47 +0000 (+0000) Subject: Document the bad behaviour of for(1..5){$_++} X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=be61827f32f7b49ea321451b189a9235d1190874;p=p5sagit%2Fp5-mst-13.2.git Document the bad behaviour of for(1..5){$_++} (it works but it should fail) p4raw-id: //depot/perl@16439 --- diff --git a/pod/perldelta.pod b/pod/perldelta.pod index edaa655..52ffc24 100644 --- a/pod/perldelta.pod +++ b/pod/perldelta.pod @@ -2740,6 +2740,14 @@ This is caused by the characters \xFF (y with diaeresis) and \xBE (Y with diaeresis) not behaving correctly when being matched case-insensitively. +=head2 Modifying $_ Inside for(..) + + for (1..5) { $_++ } + +works without complaint. It shouldn't. (You should be able to +modify only lvalue elements inside the loops.) You can see the +correct behaviour by replacing the 1..5 with 1, 2, 3, 4, 5. + =head2 mod_perl 1.26 Doesn't Build With Threaded Perl Use mod_perl 1.27 or higher. @@ -2748,7 +2756,7 @@ Use mod_perl 1.27 or higher. Don't panic. Read INSTALL 'make test' section instead. -=head2 HP-UX lib/posix Subtest 9 Fails When LP64-Configured +=head2 HP-UX lib/posix Subtest 9 Fails When LP64-Configured If perl is configured with -Duse64bitall, the successful result of the subtest 10 of lib/posix may arrive before the successful result of the