![]() |
|
Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: Converting HoA into AoHby robin (Chaplain) |
on Oct 31, 2005 at 18:10 UTC ( #504383=note: print w/replies, xml ) | Need Help?? |
Here is a confusing but concise recursive function that does what I think you want. It destroys the input, so you might need to make a deep copy of it first. I would explain how it works, but it’s quite a fun puzzle like this. :-) Update: Roy Johnson (above) has just posted a nicer implementation of the same idea.
In Section
Seekers of Perl Wisdom
|
|