Miguel has asked for the wisdom of the Perl Monks concerning the following question:
This is a simple (perhaps, dumb) question, but how do I convert a List of Lists like This:
my @AoA = ( [qw/10 27 17 20/], [qw/10 24 22 25/], [qw/11 25 24 25/], [qw/11 26 19 20/], )
into an Hash of Hashes of Arrays like this:
my %HoH = ( 10 => { 27 => [17 .. 20], 24 => [22 .. 25], }, 11 => { 25 => [24 .. 25], 26 => [19 .. 20], } );
where the first column is the key of the first Hash and the second column is the key of the second hash?
TIA,
Miguel
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hash of Hashes of Arrays
by Ovid (Cardinal) on Jan 11, 2005 at 01:52 UTC | |
by Miguel (Friar) on Jan 11, 2005 at 01:57 UTC | |
|
Re: Hash of Hashes of Arrays
by BrowserUk (Patriarch) on Jan 11, 2005 at 01:59 UTC | |
|
Re: Hash of Hashes of Arrays
by trammell (Priest) on Jan 11, 2005 at 02:00 UTC |