in reply to How to test equality of hashes?
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.use Storable 'freeze'; $Storable::canonical = 1; if (freeze(\%hash1) eq freeze(\%hash2)) { # they're equal }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: How to test equality of hashes?
by Brovnik (Hermit) on Jun 20, 2001 at 12:42 UTC | |
Re:{2} How to test equality of hashes?
by jeroenes (Priest) on Jun 20, 2001 at 18:40 UTC | |
by bikeNomad (Priest) on Jun 20, 2001 at 18:51 UTC |