Otogi has asked for the wisdom of the Perl Monks concerning the following question:
This most probably has been answered before but can't come up with the right keys to research it.
I want to dynamically create a hash with multiple dimensions (number of dimensions dynamically increase) for example:
So as the script is running I could add more dimensions to the initial hash using a subroutine called given the initial $data{$a} . How do I do that? and how would I read the hash to get the keys and values if I don't know the dimension of the hash. Thank you.$data {$a}{$b} $data {$a}{$b}{$c} $data {$d}{$e}
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: unknown number of dimensions of a multidimensional hash
by GrandFather (Saint) on Mar 09, 2006 at 23:22 UTC | |
Re: unknown number of dimensions of a multidimensional hash
by duff (Parson) on Mar 10, 2006 at 00:47 UTC | |
Re: unknown number of dimensions of a multidimensional hash
by Anonymous Monk on Mar 10, 2006 at 00:47 UTC |
Back to
Seekers of Perl Wisdom