in reply to Print hash keys and lookup the keys for values in another filr

From the first file you are trying to find a unique list of the counties that match the word 'Wood'. That means the counties need to be the keys and the values can be an empty anoynymous array. For the second file you only need to iterate through the lines, split each line and lookup the third column in the hash. If the key exists then push the first column into an array at the value for that key in your hash. After reading through file 2 you can make a simple function to print out the values. This is a great chance for you to learn how to use a hash of arrays. Let us know what questions you have as you work through these steps.

  • Comment on Re: Print hash keys and lookup the keys for values in another filr
  • Download Code