in reply to Re: given == for?
in thread given == for?

At the moment, I can't think of anything given gives you that for/foreach doesn't.

Catching break.

If you nest a for-loop and a given, you can selectively escape them with last and break.

(OK, you can do that with labels too).

Perl 6 - links to (nearly) everything that is Perl 6.

Replies are listed 'Best First'.
Re^3: given == for?
by JavaFan (Canon) on Jul 22, 2010 at 13:38 UTC
    If you nest a for-loop and a given, you can selectively escape them with last and break.

    (OK, you can do that with labels too).

    At least last allows labels - break doesn't.