foreach my $vals ( keys %{ $xml }){ print Dumper $vals; } #### $VAR1 = { 'precipitation' => { 'mode' => 'no' }, 'pressure' => { 'unit' => 'hPa', 'value' => '1031.65' }, 'temperature' => { 'min' => '81.15', 'value' => '81.15', 'max' => '81.15', 'unit' => 'fahrenheit' }, 'humidity' => { 'unit' => '%', 'value' => '89' }, 'visibility' => {}, 'wind' => { 'direction' => { 'value' => '202.503', 'name' => 'South-southwest', 'code' => 'SSW' }, 'gusts' => {}, 'speed' => { 'name' => 'Gentle Breeze', 'value' => '4.61' } }, 'clouds' => { 'name' => 'clear sky', 'value' => '8' }, 'weather' => { 'value' => 'clear sky', 'icon' => '02d', 'number' => '800' }, 'lastupdate' => { 'value' => '2016-05-16T18:27:33' }, 'city' => { 'name' => 'Pine Island Center', 'id' => '4168493', 'coord' => { 'lat' => '26.61', 'lon' => '-82.12' }, 'sun' => { 'rise' => '2016-05-16T10:40:09', 'set' => '2016-05-17T00:09:55' }, 'country' => 'US' } };