http://www.perlmonks.org?node_id=998273

Hopfi has asked for the wisdom of the Perl Monks concerning the following question:

Hi PerlMonks! I was wondering if there is a way in perl to make a list which counts each occurence of a value. I want to use it to make a picture encrypter. So it should make a color occurence list like this:
ID Occurence 255 625 212 365 220 186 219 135 169 132 227 116 213 115 234 21 205 18 184 15
Any idea how this could be done? Cheers