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");