eppo has asked for the wisdom of the Perl Monks concerning the following question:
I'm hoping someone could help me out with this, I'm trying to create a structure like this:
%hash{ ID => [ [1,2,3,4,5],[1,2,3,4,5] ] }what i'm doing is iterating over the rows of a database table, for each row, I want to add it to that inner array. , so if i added another row it would look like this:
%hash{ ID => [ [1,2,3,4,5],[1,2,3,4,5],[1,2,3,4,5] ] }I'm having trouble wrapping my head around it. how would I add @ARRAY to the hash? Thanks
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Adding to hash that contains an array of arrays
by moritz (Cardinal) on Jan 29, 2014 at 20:14 UTC | |
|
Re: Adding to hash that contains an array of arrays
by rnewsham (Curate) on Jan 29, 2014 at 20:16 UTC | |
by eppo (Novice) on Jan 29, 2014 at 20:34 UTC | |
by FloydATC (Deacon) on Jan 30, 2014 at 12:39 UTC |