in reply to how to get all keys of inner hashes
Have a read of the FAQ How do I merge two hashes? and the Data Structures Cookbook.