Perl

NAVIGATION
CATEGORIES
REFERRENCE
LINKS
  • NEXT and the general loop statement

    0 answers - 793 bytes - related search similar search Add To My Delicious Add To My Stumble Upon Add To My Google Mark Add To My Facebook Add To My Digg Add To My Reddit

    Message
    From: Luke Palmer [mailto:lrpalmer (AT) gmail (DOT) com]
    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 {

Re: NEXT and the general loop statement


max 4000 letters.
Your nickname that display:
In order to stop the spam: 9 + 8 =
QUESTION ON "Perl"

EMSDN.COM