in reply to print identical keys once along with their values
Rather than just using a hash, you want to use a hash of arrays, because you want to associate each key with multiple values. In this case, you might even want to use an Array of Arrays, since your keys are numeric. See HASHES OF ARRAYS in perldsc, and maybe perllol, perldata, perlreftut, and/or perlref for additional info.
#11929 First ask yourself `How would I do this without a computer?' Then have the computer do it the same way.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: print identical keys once along with their values
by soonix (Chancellor) on Nov 05, 2015 at 09:11 UTC | |
by kennethk (Abbot) on Nov 05, 2015 at 15:14 UTC |