#!/usr/bin/perl use strict; use warnings; use FreezeThaw qw(cmpStrHard); my %a; my %b; %a = %b = ( 'this' => 'FOO', more => [ 'one', 'two' ], 'that' => 'FOO', more => [ 'one', 'three' ] ); $a{MORE} = \%b; $b{MORE} = \%a; printf "a and b contain %s hashes\n", cmpStrHard( \%a, \%b ) == 0 ? "the same" : "different";