%Country= ( 'State1' =>{ 'city'=> [ '1', '9.4495', '97.1521', '22.0331' ] } ); foreach my $state (keys %Country) { foreach my $city (keys %{$Country{$state}}) { for my $c (@{$Country{$state}{$city}}) { print $c; } } }