It is easier to help if you provide your code and let us point you what you need to change.
- First, write some code that would open,read one line and close
- Then, write your sample line on a sheet of paper and try to split it to extract your valuable parts: code number for the hash key and directory path for finding the files.
- Finally, write your code and do a sub that would receive the file's path , open it and read it and write it where you want it to be.
- Then, add iteration to the line reading, call that sub with every value of the hash and that's all.
It is easier if you start coding your first lines, than explaining it all with words.