my @keys = (1 .. 5); my @values = (6 .. 8); my %hash; @hash{@keys} = (@values, ('') x (@columns - @values));