in reply to Re: extract number of times a value appears in an array
in thread extract number of times a value appears in an array
Whilst recent versions of Perl do away with the memory problems of using map in a void context, it still seems strange to me to use map purely for its side effects. Particularly when for usually works just as well.
$count->{$_}++ for @a;
"The first rule of Perl club is you do not talk about
Perl club."
-- Chip Salzenberg
|
|---|