* Chas Owens [2007.04.09 11:00]:
> >       for (my $i = 0; $i < @banks; $i++)
> 
> If you must loop this way at least do it like this:
> 
> for my $i (0 .. $#banks) {}
> 
> But most likely you don't need to loop that way and it is better to
> loop this way:
> 
> for my $bank (@banks) {}

I've been wondering: is the array guaranteed to be
traversed in the same order in all three cases?

And are the latter two really "for" and not
"foreach"?

-- 
JR

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to