in reply to Re^2: confused with a hash which contains reversed keys
in thread confused with a hash which contains reversed keys

Sorting like that won't produce consistent results. If EA is present in the original hash but not AE, you'll end up with EA instead of AE. Sort the chars of the key rather than the order in which they are fetched to avoid guessing under which key a particular value is located.
  • Comment on Re^3: confused with a hash which contains reversed keys

Replies are listed 'Best First'.
Re^4: confused with a hash which contains reversed keys
by Anonymous Monk on Dec 03, 2007 at 14:57 UTC
    you have right with the sorting but i can't understand
    what do you mean "Sort the chars of the key "
    how i can do that by using the code of the first answer ?