in reply to Parsing deep XML
In other words, $ref is a hashref, and $ref->{ICD_Description} is also a hashref, but you're trying to use it like it's an array ref. The output from Dumper is the key to seeing what kind of data are in the variable. If a section starts with a {, it is a hashref; if it starts with a [ it is an array ref. It also looks like StructureType points to an array ref, which then has a list of hashrefs.
You should be able to access the array of StructureTypes with something similar to the following (untested):
foreach my $structure_type (@{$ref{ICD_Description}{MsgData}{MsgDataRe +gion}{Msg_Data}{Array}{StructureType}}) { print "$structure_type{DataLine}{DataField}\n"; }
|
|---|