in reply to Re^2: Parsing hash from XML::Simple
in thread Parsing hash from XML::Simple
UPDATE2: Added quotes around "values %$xml" .. apparently the OP missed the "values" keyword. My bad for assuming the meaning was clear.
Alternatively, (if you want to keep using keys), try
Update: The above assumes you have a HOH containing info on multiple cities.print $xml->{$vals}{city}{name}
Your posted DUMP contains only ONE city. For that case, the "for loop" and "keys" does not make sense. simply use $xml->{city}{name}.
This is not an optical illusion, it just looks like one.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: Parsing hash from XML::Simple
by Anonymous Monk on May 16, 2016 at 19:24 UTC | |
by Corion (Patriarch) on May 16, 2016 at 19:47 UTC | |
by Laurent_R (Canon) on May 16, 2016 at 20:43 UTC | |
|
Re^4: Parsing hash from XML::Simple
by Anonymous Monk on May 17, 2016 at 13:12 UTC | |
by Corion (Patriarch) on May 17, 2016 at 13:18 UTC | |
by NetWallah (Canon) on May 17, 2016 at 14:06 UTC |