note
mrborisguy
<p>Why not use <c>for</c> in this example, since you're not really transforming <c>@items</c> into a new array (common use of <c>map</c>), but rather just performing an action for each value in <c>@items</c> (common use of <c>for</c>).</p>
<code>
$bag->{$_}++ for @items;
# instead of
map {$bag->{$_}++} @items;
</code>
<p> -Bryan</p>
517458
517463