foreach (keys %{$new_hash->{key1}->{key2}->{key3}}) { print "$_ \n"; }