in reply to Problem traversing nested nodes XML::Simple

Next time be a little more specific what your problem is. This looks like "I'm not able to go any further, please do my work for me" to me.

When you enable:

use strict; use warnings;
as you always should and have a look to the Data::Dumper output you see that $library->{place} returns an array of hashrefs not a single hashref. This is you problem. You can start with changing
foreach my $key ( keys %{$library->{place}} ) {
to
foreach my $place ( @{$library->{place}} ) { foreach my $country ( @{$place->{country}}) { if ($country eq 'SouthAfrica') {