Thank you for your response! Yes, I have all those typical things at the top, so no problem there. The only data that is coming in that isn't listed, is from the 2009.txt file. The information is two columns: Names of people which becomes the key of the %Diag hash called "$RID" and diagnosis codes that are the values labelled "$DiagCode". I fixed the typo with the file name. It should be "Output by RID".
Now for the technical stuff. So, I understant what you are saying, the $RID should not have a "my" in front of it even though I'm using strict, because that makes it a new variable. Check, removed "my"
I re-opened the file because I was thinking that the script wrote the hash to "Output by RID" then I closed it, then I would reopen it and essentially rename the $DiagCode that were in that file with their technical name using the @Search %Frequency lines. So, I guess that is the wrong way of doing it. Can you please give me a suggestion on how I can import that 2009.txt file into the hash and then rename just the $DiagCode to their technical names using the @Search %frequency?
Finally how would I print everything? Do you just keep appending to the file? As noted in my original question, I need the format to look like the above, but I'm not sure how to merge things. I tried printing a block with EOF, but it didn't work. I tried printing them to different files and merging them, I tried appending the file a bunch of times, but surely there is an easier way! Thanks so much for your help.
In reply to Re^2: Putting Hash values into an array
by Raya4505
in thread Putting Hash values into an array
by Raya4505
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |