P is for Practical | |
PerlMonks |
Re^8: modify the contents of an arrayby nothingmuch (Priest) |
on Sep 29, 2005 at 21:55 UTC ( [id://496260]=note: print w/replies, xml ) | Need Help?? |
uh, seriously, wtf?
They're the same, except one is more confusing to read, because most people expect it's return type to be used. Just because larry likes something is not a reason everyone should be following him (we should all be blindingly following Perl Best Practices instead ;-), but map in void context has no advantage over for, but does add an element of confusion (did the author mean to assign to a result array? did the author not know about for? am I reading this badly? let me go up one line and see if it's a multi line assignment statement). Optimizing for readability is universal good style.
-nuffin zz zZ Z Z #!perl
In Section
Seekers of Perl Wisdom
|
|