Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Above is what my hash structure looks like. It is dynamically built as I'll never know how deep or how many items there will be. The tricky part for me is the first "1" in the example above is an iterator. On particular iterations through my loop if it == that number, I need to look into that hash's data.%hash = ( 1 => { 1 => "", #dynamically created name => "", that => "", }, 2.... # iteration );
In the above, how could I detect {2} as the highest number so I know to start at {3} next time something is added?$hash{1}{1} = "blah"; $hash{1}{2} = "blah";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Determine largest key in hash
by BrowserUk (Patriarch) on Oct 04, 2011 at 17:33 UTC | |
by Anonymous Monk on Oct 04, 2011 at 17:48 UTC | |
by MidLifeXis (Monsignor) on Oct 04, 2011 at 17:56 UTC | |
by BrowserUk (Patriarch) on Oct 04, 2011 at 18:02 UTC | |
|
Re: Determine largest key in hash
by tj_thompson (Monk) on Oct 04, 2011 at 17:41 UTC | |
by Anonymous Monk on Oct 04, 2011 at 18:42 UTC | |
|
Re: Determine largest key in hash
by blue_cowdawg (Monsignor) on Oct 04, 2011 at 17:34 UTC | |
|
Re: Determine largest key in hash
by MidLifeXis (Monsignor) on Oct 04, 2011 at 17:39 UTC |