On Fri, 2002-03-01 at 14:52, James Taylor wrote:
> I'm really curious what the point of foreach is considering for does the same 
> exact thing? For example:
> 
> @myarray = (1 .. 10);
> 
> for (@myarray) {
>    print "$_\n";
> }
> 
> 
> Or, you could swap the for for a foreach and the same thing would get 
> accomplished...  The only difference I can think of is a slightly different 
> handling of hashes.  Is this the only benefit of foreach?  What am I missing 
> here

It is my understanding that for and foreach were once different, but now
the same.  Which would mean that foreach is still here for backward
compatibility and style reasons.

-- 
Today is Setting Orange the 60th day of Chaos in the YOLD 3168
Hail Eris!

Missile Address: 33:48:3.521N  84:23:34.786W


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to