in reply to better way to printing random hash key and its value

Any time you have repeated copies of similar code, and variable names that contain a sequential integer, it should be a clue that you really have a data structure. It seems that what you want is an array (or perhaps a hash) above your other hashes so that you have one structure over which you can iterate.
  • Comment on Re: better way to printing random hash key and its value