in reply to If a hash key is a reference...

You can use the Tie::RefHash module.
The following should work:

use Tie::RefHash;

tie %hash, "Tie::RefHash";
$hash{$somereference} = ...