in reply to Re^2: XML::Simple Multi-Layered
in thread XML::Simple Multi-Layered
The square brackets indicate array refs so you need an element index (a number). So ['mass'] won't work.print $doc->{species}{$key}{'physical-characteristics'}[0]{mass}[0] # and print $doc->{species}{$key}{'physical-characteristics'}[0]{appearance} +[0]
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: XML::Simple Multi-Layered
by eide (Initiate) on Aug 16, 2007 at 22:01 UTC | |
then Data::Dumper gives me output like this: Sorry for the mess but I'm tired of formatting. Anyway, I basically want to get all of the interval=>names for the business_area client_system and I have: or something like that. Just confused with the syntax on the print command. Probably also have to loop through again to get all the interval names. Thanks in advance | [reply] [d/l] [select] |
by wfsp (Abbot) on Aug 17, 2007 at 11:59 UTC | |
You have a series of nested hash of arrays (HoAs). Here I've extracted the array ref we want and looped over it.
Read more... (2 kB)
output:
fwiw | [reply] [d/l] [select] |