Do you know where your variables are? | |
PerlMonks |
Re: How do I iterate through this data set?by 7stud (Deacon) |
on May 21, 2011 at 20:28 UTC ( [id://906093]=note: print w/replies, xml ) | Need Help?? |
You have this hash:
Immediately following the arrow is a bracket, and a bracket is the syntax for an array reference. So when you use the 'item' key to get its corresponding value, you get an array reference back. You are are treating the array reference as a hash reference. Looking at the original data, the array has a bunch of hash references for elements. Hash references are denoted by braces: {...} I would rename the variable in Corion's loop to help you keep track of what type you are getting out of the array:
In Section
Seekers of Perl Wisdom
|
|