From: Gurusamy Sarathy <gsar@cpan.org>
Date: Sat, 2 Oct 1999 01:43:25 +0000 (+0000)
Subject: add notes about effect of loop control statements inside
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6c1372ede9e641f6d25ae7a5966416ab272c51d3;p=p5sagit%2Fp5-mst-13.2.git

add notes about effect of loop control statements inside
LABEL BLOCK continue BLOCK

p4raw-id: //depot/perl@4277
---

diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod
index 82c0521..a09c6e5 100644
--- a/pod/perlfunc.pod
+++ b/pod/perlfunc.pod
@@ -2149,6 +2149,10 @@ C<last> cannot be used to exit a block which returns a value such as
 C<eval {}>, C<sub {}> or C<do {}>, and should not be used to exit
 a grep() or map() operation.
 
+Note that a block by itself is semantically identical to a loop
+that executes once.  Thus C<last> can be used to effect an early
+exit out of such a block.
+
 See also L</continue> for an illustration of how C<last>, C<next>, and
 C<redo> work.
 
@@ -2394,6 +2398,9 @@ C<next> cannot be used to exit a block which returns a value such as
 C<eval {}>, C<sub {}> or C<do {}>, and should not be used to exit
 a grep() or map() operation.
 
+Note that a block by itself is semantically identical to a loop
+that executes once.  Thus C<next> will exit such a block early.
+
 See also L</continue> for an illustration of how C<last>, C<next>, and
 C<redo> work.
 
@@ -3285,6 +3292,10 @@ C<redo> cannot be used to retry a block which returns a value such as
 C<eval {}>, C<sub {}> or C<do {}>, and should not be used to exit
 a grep() or map() operation.
 
+Note that a block by itself is semantically identical to a loop
+that executes once.  Thus C<redo> inside such a block will effectively
+turn it into a looping construct.
+
 See also L</continue> for an illustration of how C<last>, C<next>, and
 C<redo> work.