|Perl Monk, Perl Meditation|
Converting HoA into AoHby neversaint (Deacon)
|on Oct 31, 2005 at 06:04 UTC||Need Help??|
neversaint has asked for the
wisdom of the Perl Monks concerning the following question:
Is there a quick way to transform a HoA into AoH like this, from:
The size of the hash and array in HoA input maybe varying.
Update: Correction made on the correct data structure of the desired results, thanks to pg comments.
Update 2: The actual HoA in my production code looks like this:
Update 3:Additional examples:
With array of only one element
With array of differing size:
neversaint and everlastingly indebted.......