in reply to Re: "last" not really outside loop block
in thread "last" not really outside loop block
{ my $a = 3; do { last unless $a == 4; } while 1; }
The difference being that you would be escaping the block and the loop. In my brain's parsing of your version, I last outside of the loop which is still inside the block and then re-enter because of the post-fix while condition.
Cheers - L~R
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: "last" not really outside loop block
by ikegami (Patriarch) on Jun 22, 2009 at 17:01 UTC | |
|
Re^3: "last" not really outside loop block
by BrowserUk (Patriarch) on Jun 22, 2009 at 17:02 UTC |