[ABE.pm] 'for' statement Q

Andy Armstrong andy at hexten.net
Mon Aug 18 04:10:36 PDT 2008


On 15 Aug 2008, at 20:10, Ricardo SIGNES wrote:
>> I'm looking at the Nutshell book and the llama book.  Both treat  
>> the for
>> and foreach as different control structures.
>
> Nutshell kinda sucks.  Llama 4 is pretty clear.  It introduces  
> 'foreac LIST' on
> page 46, then three-part for on page 142, and immediately after  
> explaining
> three-part for it has a section explaining that for/foreach are  
> interchangeable
> and that "real world" Perl programmers will always write for,  
> because it saves
> four keystrokes.
>
> I don't know about Llama 1-3 or 5.


5 has "The Secret Connection Between foreach and for" starting on p157  
which makes it pretty explicit.

-- 
Andy Armstrong, Hexten





More information about the ABE-pm mailing list