There's more than one way to do things | |
PerlMonks |
Re: Re: Re: Merging hashesby shotgunefx (Parson) |
on Sep 10, 2002 at 12:31 UTC ( [id://196642]=note: print w/replies, xml ) | Need Help?? |
Thats what hashes do. map a unique key to a unique values. But you can make that value an array ref and store your multiple values. It also looks like you want to apply it recursively. May I ask what you are trying to do? -Lee "To be civilized is to deny one's nature." UPDATE Here's enough rope to hang yourself with. Merges N hashes arbitrarily deep. Making it merge arrays as well is left as an exercise for the reader. Dies on circular references. Not heavily tested.
In Section
Seekers of Perl Wisdom
|
|