in reply to Count of array value into hash
@array=("one", "two", "one" "three", "four", "one", "two"); | # comma missing ----------+
Anyways, it's dead simple, and the FAQ entries on arrays will tell you.
$hash->{$_}++ for @array;
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
|
|---|