And the hash "%counts" will contain the item as a key and its count as the key's value. This is really a short version of the first post, but map is a neat function :). pFmy %counts = (); map {$counts{$_}++} @list;
In reply to Re: Count and List Items in a List
by perlfan
in thread Count and List Items in a List
by Tech77
For: | Use: | ||
& | & | ||
< | < | ||
> | > | ||
[ | [ | ||
] | ] |