Re: What am I doing wrong?!

From: David K. Wall (usenet_at_dwall.fastmail.fm)
Date: 10/30/03


Date: Thu, 30 Oct 2003 18:32:55 -0000

Jürgen Exner <jurgenex@hotmail.com> wrote:

> Tore Aursand wrote:
>> On Thu, 30 Oct 2003 02:12:54 -0800, Tony Walker wrote:
>>> I'm now trying
>>> for (@entry)
>>>
>> Use 'foreach';
>> foreach ( @array )
>
> What exactly would be the difference between 'for' and 'foreach'
> (besides the additional 4 letters)?

It's a bit more explicit about what it's doing? perlsyn gives
'readability' as the justification for the existence of 'foreach', but
that's arguable, and I don't really see the need for it. 'foreach' is
a bit of dead yeast left in the Perl beer, IMHO; forget the yeast and
enjoy the flavor. :-)

-- 
David Wall