##
$cost = $h->Locations->$location->Buildings->$b->cost;
####
$cost = $h->{"Locations.$location.Buildings.$b.cost"};
####
while (my ($key, $value) = $h->each)
{
print "$key => $value\n";
}
OUTPUT:
Locations.Earth.Buildings.PowerPlant.cost => 7
Locations.Earth.Buildings.PowerPlant.size => 4
Locations.Earth.Coordinates => 12.0,72.4
Locations.Squaffle.Buildings.SaltRefinery.cost => 2
.
.
.