chomp($headerline = ); my @header = split(/\t/,$headerline); #### my @header = qw(fn ln age); #### while( ) { chomp; my $c = 0; my @columns = split(/\t/,$_); push @a, { map { $header[$c++] => $_ } @columns }; }