From: M. J. T. Guy Date: Tue, 18 Aug 1998 12:28:36 +0000 (+0100) Subject: document non-loopish blocks better X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4968c1e4fb50e28f5f275a60b70129c61fe3ca9e;p=p5sagit%2Fp5-mst-13.2.git document non-loopish blocks better Message-Id: Subject: Re: next in do {} while block gives error message p4raw-id: //depot/perl@1811 --- diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index 9cab569..2d7b251 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -894,6 +894,9 @@ sequence of commands indicated by BLOCK. When modified by a loop modifier, executes the BLOCK once before testing the loop condition. (On other statements the loop modifiers test the conditional first.) +C does I count as a loop, so the loop control statements +C, C or C cannot be used to leave or restart the block. + =item do SUBROUTINE(LIST) A deprecated form of subroutine call. See L. @@ -1152,6 +1155,10 @@ normally you I like to use double quotes, except that in this particular situation, you can just use symbolic references instead, as in case 6. +C does I count as a loop, so the loop control statements +C, C or C cannot be used to leave or restart the block. + + =item exec LIST =item exec PROGRAM LIST @@ -1938,6 +1945,9 @@ C block, if any, is not executed: #... } +C cannot be used to exit a block which returns a value such as +C, C or C. + See also L for an illustration of how C, C, and C work. @@ -2139,6 +2149,9 @@ Note that if there were a C block on the above, it would get executed even on discarded lines. If the LABEL is omitted, the command refers to the innermost enclosing loop. +C cannot be used to exit a block which returns a value such as +C, C or C. + See also L for an illustration of how C, C, and C work. @@ -2769,6 +2782,9 @@ themselves about what was just input: print; } +C cannot be used to retry a block which returns a value such as +C, C or C. + See also L for an illustration of how C, C, and C work.