in reply to (ar0n) Re (2): How to test equality of hashes?
in thread How to test equality of hashes?
I do flattening for comparison by shoving a hashref into an array ( @foo = %{$foo} ) and then sorting the array ( @foo = sort @foo ) and flattening that into a string.,p> The obvious problem with this is that if you have a hash where the keys/values were transposed then it would still appear equal. Similar situations will occur with other data anomolies.
Not a problem in my case, but worth remembering.
|
|---|