Ariel Scolnicov wrote:
>
> Chaim Frenkel <[EMAIL PROTECTED]> writes:
>
> > yield EXPR - stop what I am doing now and give something else a
> > a chance to do its things. And while you are doing
> > that please take this EXPR from me.
>
> When you put it this way, isn't C<yield> spelled C<return> in Perl5?
> (Except, of course, that C<return> inside a C<grep> does a whole lot
> more nowadays).
And except that C<yield> allows you to pick up where you left off later,
at least per Damian's RFC 31: "Co-routines". For a grep/map this could
potentially be really useful, especially if you have code that modifies
values in your block but want to do it conditionally/iteratively.
-Nate