in reply to given-when last time through loop?
Every time through the loop the last say statement executes--except the last time through the loop. Why?
Your explicit call to continue inhibits the implicit call to break or next at the end of the when-block.
Also, "Learning Perl 5th" says there is an implicit break at the end of each when block, but I get errors if I do this:
It seems that if you use for instead of given as the outer control structure, it defaults to next instead of break.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: given-when last time through loop?
by 7stud (Deacon) on Nov 19, 2009 at 14:10 UTC | |
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 |