in reply to Re^2: dynamic hash name
in thread dynamic hash name

$data{citystate} contains a reference to a hash, so where you had
for my $key ( keys %citystate ) {
you now use
for my $key ( keys %{ $data{citystate} } ) {