"Steve Canfield" <[EMAIL PROTECTED]> writes:
> Will Perl6 have labeled if blocks? Like this:
>
> BLAH:
> if ($foo) {
> ...
> last BLAH if $bar;
> ...
> }
why not use -> to create a sub which you can return from?
if $foo -> {
...
return if $bar;
...
}
this of course means you can't directly return from the sub (or whatever) in
which the if (or given or while or for) is nested...
slightly related:
what happens to the return value of the subs passed to for, if, while
and given statements? (what does '$foo = if $bar { ... } else { ... }'
do?)
--
-Marco
Ring the bells that still can ring.
Forget your perfect offering.
There is a crack in everything.
That's how the light gets in.
-Leonard Cohen