my @Data; my @cols = qw(col1 col2 col3 col4); while () { chomp; my %table; @table{@cols} = split /\t/; ## Explain push @Data, \%table; }