in reply to Obtain Key from Hash using value

This is a FAQ: How do I look up a hash element by value?. The short answer for one-to-one mappings is use reverse:
%by_value = reverse %by_key; $key = $by_value{$value};