use Data::Dumper; use Test::More qw(no_plan); $AoH[0]->{heading}->[3]->{item} = 'eee'; print Dumper @AoH; $BoH[0]->{heading}->[3] = {item => 'eee'}; print Dumper @BoH; is_deeply(@AoH,@BoH,"They're the same"); #### $VAR1 = { 'heading' => [ undef, undef, undef, { 'item' => 'eee' } ] }; $VAR1 = { 'heading' => [ undef, undef, undef, { 'item' => 'eee' } ] }; ok 1 - They're the same 1..1