while (my $line = ) { my %hash; @hash{qw(key0 key1 key2 key3 key4)} = split /\t/, $line; print "Key 3 is $hash{key3}\n"; push @lines_of_file, \%hash; }