P is for Practical | |
PerlMonks |
Re^4: grep, map vs. foreach performanceby Flexx (Pilgrim) |
on Sep 04, 2002 at 13:04 UTC ( [id://195062]=note: print w/replies, xml ) | Need Help?? |
Ok, that's synonymous. Yet, unless I got something completely wrong (then please correct me), constructs like
and foreach(@array){ print $_++; }; do something different internally. Of course, the second is generally the better/faster approach (unless you don't need $i for something else in the loop, since $i is an unnecessary artificial variable in the first example)). So long,
In Section
Seekers of Perl Wisdom
|
|