Don't ask to ask, just ask | |
PerlMonks |
Re: How to test equality of hashes?by bikeNomad (Priest) |
on Jun 20, 2001 at 06:55 UTC ( [id://89901]=note: print w/replies, xml ) | Need Help?? |
Another way to compare (possibly arbitrarily deep) hashes is to stringify them using Storable and then compare the strings: However, both this and the prior version I suggested suffer from a potential problem having to do with floating point accuracy and the stringification of numbers. Be warned. If you're not using numbers, both will work OK.
In Section
Seekers of Perl Wisdom
|
|