Myrddin Emrys has asked for the wisdom of the Perl Monks concerning the following question:
For example, if I had: (I have a bigger array though) @names = {Tom, Dick, Harry, Tom} I would like to output something like:
Is there an easy bit of code to do this?Tom = 2 Dick = 1 Harry = 1
Help please,
Myrddin
Edit by tye to preserve formatting and change title from "Manipulating Arrays"
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Counting repeated values from an array
by grinder (Bishop) on Jul 31, 2001 at 01:21 UTC | |
|
(ichimunki) Re: Manipulating Arrays
by ichimunki (Priest) on Jul 31, 2001 at 01:20 UTC | |
|
Re: Manipulating Arrays
by damian1301 (Curate) on Jul 31, 2001 at 01:38 UTC | |
by ChOas (Curate) on Jul 31, 2001 at 12:41 UTC | |
|
Re: Manipulating Arrays
by dsb (Chaplain) on Jul 31, 2001 at 01:20 UTC |