in reply to {} vs do{}
Naked BLOCK's on the other hand do not return values, cannot be used with loop modifiers, but can use loop control statements. Both naked BLOCK's and do BLOCK establish a new lexical scope within the BLOCK, however.Not really a function. Returns the value of the last command in the se +quence of commands indicated by BLOCK. When modified by a loop modifier, executes the BLO +CK once before testing the loop condition. (On other statements the loop modifiers test the c +onditional first.) do BLOCK does not count as a loop, so the loop control statements next +, last, or redo cannot be used to leave or restart the block. See the perlsyn manpage for alt +ernative strategies.
MeowChow s aamecha.s a..a\u$&owag.print
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: {} vs do{}
by scott (Chaplain) on Jul 05, 2001 at 01:34 UTC | |
by MeowChow (Vicar) on Jul 05, 2001 at 01:44 UTC | |
by John M. Dlugosz (Monsignor) on Jul 21, 2001 at 01:47 UTC |