You can't do this directly, but you could use the standard Tie::RefHash module distributed with Perl.