Win8 Strawberry 5.8.9.5 (32) Sun 08/15/2021 17:43:06 C:\@Work\Perl\monks >perl use strict; use warnings; use Data::Dump qw(dd); my %current_main_record; for my $k (qw(a b c)) { my @role_records; # new array for my $v (qw(Z Y)) { push @role_records, { $k => $v }; } push @{ $current_main_record{'role_data'} }, \@role_records; } dd \%current_main_record; ^Z { role_data => [ [{ a => "Z" }, { a => "Y" }], [{ b => "Z" }, { b => "Y" }], [{ c => "Z" }, { c => "Y" }], ], }