> -----Original Message-----
> From: Luke Palmer [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 17, 2006 8:44 PM
> To: Perl6 Language List
> Subject: Re: NEXT and the general loop statement
> Wasn't NEXT supposed to do something tricky, such as being mutually
> exclusive with LAST?  I remember a debate some time ago where some
> complained "but that would be hard to implement", and the solution
> being mostly correct but failing in this case.
> 
> I seem to recall NEXT being created in order to do things like this:
> 
>     for @objs {
>         .print;
>         NEXT { print ", " }
>         LAST { print "\n" }
>     }
> 

Is this even possible?  This would require Perl to know which iteration is
going to be the last one.  In many cases there is no way to know this:

   repeat {

Reply via email to