develooper Front page | perl.perl5.porters | Postings from November 2011

Re: Explanation of "for" and "foreach" in perldoc

Thread Previous | Thread Next
From:
Abigail
Date:
November 29, 2011 09:33
Subject:
Re: Explanation of "for" and "foreach" in perldoc
Message ID:
20111129173254.GO6376@almanda
On Tue, Nov 29, 2011 at 12:26:29PM -0500, Eric Brine wrote:
> On Tue, Nov 29, 2011 at 3:53 AM, Christian Walde <
> walde.christian@googlemail.com> wrote:
> 
> > On Tue, 29 Nov 2011 09:47:55 +0100, Eric Brine <ikegami@adaelis.com>
> > wrote:
> >
> Why do people always leave out C<< for (EXPR..EXPR) >> when discussing
> >>
> > preferences for "for" vs "foreach"?
> >>
> >
> > Because .. does result into an array?
> 
> 
> Nope, it doesn't into an foreach loop iterating over an array or list*. It
> results into a counting loop.


Implementation detail.

From a language POV, it doesn't matter. 



Abigail

Thread Previous | 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