while () { ($1, $2, $3, $4, $5, $6) = split; $hash{$1} = [ $2, $3, $4, $5, $6 ]; } # or, alternatively, a hash of hashes: $hash{$1} = { reg => $2, score1 => $3, score2 => $4, score3 => $5, score4 => $6 }; # thus, score3 can be found as such: $hash{a}->[3]; # or with the other method: $hash{a}->{score3};