http://www.perlmonks.org?node_id=1007507


in reply to Hash element access -dereferenced hashes

Works for me. Note I use key1 as a string, not the undefined variable $key1. Use strict and warnings to catch this kind of problems.
%hash1 = (key1 => "value1"); %hash2 = (value1 => "Gotcha"); print $hash2{ $hash1{key1} }, "\n"; # Not $key1!
Output:
Gotcha
لսႽ† ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ