Larry Wall:
# "last" almost works, except it's specific 
# to loops, at least in Perl 5 semantics.  I keep thinking of 
# "ret" as a little "return", but that's mostly a placeholder 
# in my mind.  I've got a lot of those...

I don't see why C<last> has to work only on loops, or why there can't be
an alternate mode for them, or something.  With named blocks, there's no
reason one of these can't work:

        for @foo {
                CHECK: if /^_/ {
                        if /^__/ {
                                ...
                                last CHECK;
                        }
                        ...
                        last;
                }
        }

        LOOP: for @foo {
                CHECK: if /^_/ {
                        if /^__/ {
                                ...
                                last CHECK;
                        }
                        last LOOP;
                }
        }


# The only difference is that in Perl 6, there is no cat.  :-)

Ah, I see that my diabolical scheme for World Domination is proceeding
as planned...

--Brent Dax <[EMAIL PROTECTED]>
@roles=map {"Parrot $_"} qw(embedding regexen Configure)

Wire telegraph is a kind of a very, very long cat. You pull his tail in
New York and his head is meowing in Los Angeles. And radio operates
exactly the same way. The only difference is that there is no cat.
    --Albert Einstein (explaining radio)

Reply via email to