Morning all,
I have a task that I need to get done, and cant seem to get it together. I have a file that I am read via the <> operator. This files contains simply:
17 21 19 70 99 45 32 25 67 89 90 91
11 10 12 33 34 36 37
several lines of numbers from 1 to 99. In the perl file I am pulling the file in as I said with <>. I would like to read each number and store and report against a Hash called %regions. I have initialized this hash as %regions = (NYC => 12, KansasCity => 13, Chicago => 11, etc.
I would like to print out each Region and the number of time that $region{item} shows up in the file that is being pulled in.
I hope this makes sense, sorry the length of this one.
Mark
I have a task that I need to get done, and cant seem to get it together. I have a file that I am read via the <> operator. This files contains simply:
17 21 19 70 99 45 32 25 67 89 90 91
11 10 12 33 34 36 37
several lines of numbers from 1 to 99. In the perl file I am pulling the file in as I said with <>. I would like to read each number and store and report against a Hash called %regions. I have initialized this hash as %regions = (NYC => 12, KansasCity => 13, Chicago => 11, etc.
I would like to print out each Region and the number of time that $region{item} shows up in the file that is being pulled in.
I hope this makes sense, sorry the length of this one.
Mark