Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re: andye Re: How to test equality of hashes?by iakobski (Pilgrim) |
on Jun 20, 2001 at 15:27 UTC ( [id://89968]=note: print w/replies, xml ) | Need Help?? |
Neat solution.
I was going to say that they always come out in the same order because the hashing key does not change. Unfortunately that did not stand up to testing. The order the elements are inserted into the hash makes a difference: So flatten needs to be:
The answer to your question on how not to use a sub would be to use the join, map in the if clause. This saves passing the hash by value, but duplicates the logic on either side of the eq -- iakobski
In Section
Seekers of Perl Wisdom
|
|