|
|
| Just another Perl shrine | |
| PerlMonks |
Re: multiple values for one key in hashby wade (Pilgrim) |
| on May 12, 2008 at 22:04 UTC ( #686157=note: print w/ replies, xml ) | Need Help?? |
|
How about using a reference to an array. Here's a little ditty that builds the kind of hash for which you're looking and then prints out the results:
Note: you have to create the anonymous reference -- you can't just push a value if the key doesn't exist. Update: apparently you can just push the value.
-- Wade
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||