in reply to Re: given-when last time through loop?
in thread given-when last time through loop?
Hi,
Thanks for the response.
It seems that if you use for instead of given as the outer control structure, it defaults to next instead of break.
Ok. I did read this in the perlsyn docs:
On exit from the when block, there is an implicit next.
...but I found the 'on exit' language confusing. I thought they meant after the last when block. There should be a better example in the docs--that is a major change from using given-when on its own outside a loop.
The docs could simply say, "Inside a for-loop, the when blocks end with an implicit next rather than an implicit break.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: given-when last time through loop?
by moritz (Cardinal) on Nov 19, 2009 at 14:47 UTC | |
by ikegami (Patriarch) on Nov 19, 2009 at 15:36 UTC | |
by 7stud (Deacon) on Nov 19, 2009 at 15:36 UTC | |
by moritz (Cardinal) on Nov 19, 2009 at 15:57 UTC | |
by 7stud (Deacon) on Nov 20, 2009 at 13:23 UTC |