#!/usr/bin/perl use strict; use warnings; use Test::More tests => 1; my %HoA1 = ( Fruits => [ "Apple", "Orange", "Banana", "Grapes" ], ); my %HoA2 = ( Fruits => [ "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->{Fruits}[0] = 'Apple' # $expected->{Fruits}[0] = 'Apples' # Looks like you failed 1 test of 1.