develooper Front page | perl.perl6.language | Postings from August 2006

NEXT and the general loop statement

Thread Next
From:
Joe Gottman
Date:
August 16, 2006 17:21
Subject:
NEXT and the general loop statement
Message ID:
002a01c6c193$1605a5e0$b6194447@JoeGottman1
Is a NEXT clause called before or after the update portion of a general loop
statement?  For instance, consider the following code:

 

loop $n = 0; $n < 5; ++$n {

    NEXT {print $n;}

}

 

Is the output 01234 or 12345?

 

Joe Gottman

 

 


Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About