in reply to Hash/file --> doesn't seem to work
If that is unpractical read one line and iterate over the hash for each line. I.e. switch the two loops. This can be costly as well if the hash is big.