|
|
| Keep It Simple, Stupid | |
| PerlMonks |
Re: When would you choose foreach instead of map?by bl0rf (Pilgrim) |
| on May 20, 2004 at 18:33 UTC ( [id://355106]=note: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.
map is fairly hideous and foreach looks much nicer. foreach also adds to the linguistic feel of Perl ( the smooth flow ) because it is intuitively understandable and shows off the benefits of arrays. Of course map has its own uses but I think that for simple cases foreach clutters the visual space much less...
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||