Bro. Doug has asked for the wisdom of the Perl Monks concerning the following question:
Then I use the list reference to add an unspecified number of hash references to my data structure.%hash; $hash{'normal'} = "Some value" ; $hash{'list1} = [] ;
Now I can access this like so:push @{ $hash{'list1'} }, {keys=>values} ;
I'm quite interested in how a PerlMonk would do this.$foo = $hash{'list1}[0]{'key'} ;
The problem gets really messy when I try to do things like:$widget{'foo'}=$mw->Entry(-textvariable => \$hash{'normal'}); # and for dynamicly created, repeating elements $widget{'bars'}[0]{'bar1'} = $mw->Entry( -textvariable => \$hash{'bars +'}[0]{'bar1'} ) ;
I can't do this because %hash is full of references. It gives me a headache.#for storing past data (think 'back button') push @past_data, \%hash ;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Hashes of Arrays of Hashes (sometimes of Arrays)
by DrWhy (Chaplain) on Aug 11, 2006 at 22:35 UTC | |
by Bro. Doug (Monk) on Aug 12, 2006 at 00:37 UTC | |
|
Re: Hashes of Arrays of Hashes (sometimes of Arrays)
by rodion (Chaplain) on Aug 12, 2006 at 10:35 UTC | |
|
Re: Hashes of Arrays of Hashes (sometimes of Arrays)
by leocharre (Priest) on Aug 12, 2006 at 08:37 UTC |