my %current_main_record; for my $x (qw(foo bar baz)) { my @role_records; # New array. for my $y (qw(zip zap zop)) { push @role_records, $y; } $current_main_record{"role_data"} = \@role_records; }