In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/739ba955b87a7c51cbe4a37b923b0ba749c197a7?hp=9af0006bddac3108a478ad921119bb41c07b088e>
- Log ----------------------------------------------------------------- commit 739ba955b87a7c51cbe4a37b923b0ba749c197a7 Author: Ricardo Signes <[email protected]> Date: Sun Jun 9 09:41:45 2013 -0400 note that the return value of for is unspecified [perl #118121] ----------------------------------------------------------------------- Summary of changes: pod/perlsyn.pod | 6 ++++++ 1 files changed, 6 insertions(+), 0 deletions(-) diff --git a/pod/perlsyn.pod b/pod/perlsyn.pod index aecc135..eba6cee 100644 --- a/pod/perlsyn.pod +++ b/pod/perlsyn.pod @@ -533,6 +533,12 @@ rather than merely terminating the inner one. And it's faster because Perl executes a C<foreach> statement more rapidly than it would the equivalent C<for> loop. +Perceptive Perl hackers may have noticed that a C<for> loop has a return +value, and that this value can be captured by wrapping the loop in a C<do> +block. The reward for this discovery is this cautionary advice: The +return value of a C<for> loop is unspecified and may change without notice. +Do not rely on it. + =head2 Basic BLOCKs X<block> -- Perl5 Master Repository
