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

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

Hi Monks, I have this file I am reading which contains the following:
817 5:00 817 5:00 817 5:15 123 4:45 817 5:30 495 7:45
I am trying to count the occurrence of each location so for the file listed above I should have output as follow:
817=4 123=1 495=1
Any Idea of an easy way to do it? Thanks