#!/usr/bin/perl -l use strict; use warnings; use Data::Dumper; my %HoA; for my $i ( 1 .. 3 ) { push @{ $HoA{'block_' . $i } }, 3..6; } print Dumper \%HoA; __END__