in reply to (jeffa) 5Re: grep, map vs. foreach performance
in thread grep, map vs. foreach performance
Hmm.. You missed my point (or you're repeating what I said). I wasn't comparing for(ARRAY) with for(TEMP_ARRAY), but for(ARRAY) with for(EXPR;EXPR;EXPR).
I do know that for and foreach are synonymous words. I was trying to clarify that in
for (@array) {$_++}$_ is an implicit alias for the current @array element. While in
for (0 .. $#array) {$array[$_]++}$_ an alias for the current index. And that, in terms of what to use for what (as you already clarified) was the difference I meant...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: grep, map vs. foreach performance
by sauoq (Abbot) on Sep 04, 2002 at 21:40 UTC | |
by Flexx (Pilgrim) on Sep 05, 2002 at 07:28 UTC |