#!/usr/bin/perl use strict; use warnings; use Test::More tests => 1; my %HoA1 = ( Fruits => [ "Apple", "Orange", "Banana", "Grapes" ], ); my %HoA2 = ( Fruits1 => [ "Apples", "Orange", "pineapple", "Grapes" ], ); is_deeply(\%HoA1, \%HoA2, 'data structures should be the same'); __END__ $ perl test.pl 1..1 not ok 1 - data structures should be the same # Failed test 'data structures should be the same' # at test.pl line 14. # Structures begin differing at: # $got->{Fruits1} = Does not exist # $expected->{Fruits1} = ARRAY(0xdc0bc8) # Looks like you failed 1 test of 1.