Side-effects are something to be avoided when programming. I also like my code to be as self-documenting as possible. I find map is less than optimal for both of these reasons. I use for as my topicalizer.
$sum += $index{$_} for split(//, $word);
In reply to Re: map in void context
by ikegami
in thread map in void context
by dharanivasan
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |