Another way to compare to arbitrarily complex data structures is to use canonical serialization. Storable is one module that provides this capability.
For example:
use Storable; sub deeply_equal { my ( $a_ref, $b_ref ) = @_; local $Storable::canonical = 1; return Storable::freeze( $a_ref ) eq Storable::freeze( $b_ref ); }
In reply to Re: How do I test the deep equality of two hash tables?
by cmeyer
in thread How do I test the deep equality of two hash tables?
by acser
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |