"be consistent" | |
PerlMonks |
Re: multiple values for one key in hashby Anonymous Monk |
on Feb 25, 2015 at 17:29 UTC ( [id://1117848]=note: print w/replies, xml ) | Need Help?? |
I was just asking myself this same question. While I'm sure most of the comments below work just fine, I'd like to add my solution as well. I just separated the "values" by a comma, and have a single "value" related to the key in my hash. When I read out the key value, I'll just do a split on the value in order to break it up in to the individual data points I need. This is simple, and very readable/easy to understand for someone who is not quite a perl monk like me.
In Section
Seekers of Perl Wisdom
|
|