in reply to Write in files

You would read the names and phone numbers from file 1 into a hash with the names as keys and then do a lookup on the hash while reading file 2.