in reply to Parsing of 3 GB File

A database is the best solution. Dumping the data of file2 into a database is easy: you only need 2 fields per record: name and scores and you index on the "name" field, so look-up will be fast.

Then you go through file1 line by line and extract the last 2 fields and select the record with the name you are looking for. You split the scores field on whitespace and get the item indicated by the last field in the record of file 1 you are working with.

If you cannot use a database you may have to index your file2 yourself useing tell and find the records with seek.

CountZero

A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James