in reply to fast hash search
There is no 'easy' way to find a key from a value, one reason being that values need not be unique. I suggest you need to revisit your design ;-)
Iterating through a hash is generally a bad idea, but if you must then you might like to look at the 'each' function (perldoc -f each), usually called in a while loop. The advantage is that you avoid the temporary list generated when you use keys or values with foreach.
Another strategy you might consider if you have unique values is to reverse the hash(s) (perdoc -f reverse) making the keys into values, and values into keys.