in reply to How to compare content of two references for equality?

Data::Compare:

use Data::Compare; print "same" if Compare( $ref1, $ref2 );
But be aware that Data::Compare may not necessarily do the right thing in the rare case that you try to compare an object which overloads the stringify or numify operations.