Pathologically Eclectic Rubbish Lister | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I don't have my best practices in front of me, but....
I don't believe that the tip is for performance, but more for readability and clarity. As a general rule, map is better when doing a transformation, for is better when doing an iteration. Or more simply, use map when generating a result, use for otherwise. -pete "Worry is like a rocking chair. It gives you something to do, but it doesn't get you anywhere." In reply to Re: map versus for
by dreadpiratepeter
|
|