in reply to Loop through hash structure
First of all, you'll need to understand which components are hashes and which components are arrays in your data structure. It looks like you were able to apply some of the responses to your earlier question (XML:Simple Config). That's a good start.
Secondly, you need to determine at which level of your data structure are you wanting to looping through. If that level is an array, it should be simple to iterate through that level with a for loop or a foreach loop. If that level is a hash, you can look at perlfaq4 for an example of how to iterate through a hash.
However, I should point out that grantm gave you a reference to Perl documentation about complex data structures (perlreftut) in response to your earlier question (XML:Simple Config). You might find that information useful in dealing with your complex data structure.
Also, I should point out that if you don't like the default structure that XML::Simple creates, there are some options in that module that you could use to modify how it will create the data structure.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Loop through hash structure
by PerlScholar (Acolyte) on Sep 08, 2010 at 15:16 UTC |