I'm not really sure that Perl syntax allows you to alias hash entry scalars, but you can achieve the effect by using Data::Alias:
use Data::Alias; use feature 'say'; $baz{'buf'} = 'Hello'; alias $foo{'bar'} = $baz{'buf'}; say $foo{'bar'}; $foo{'bar'} = 'World'; say $baz{'buf'}; $baz{'new'} = 'old'; say $foo{'old'}; __END__ Hello World Use of uninitialized value in say at ...
In reply to Re^2: Aliasing hash-element and scalar? (Not Solved Yet)
by Corion
in thread Aliasing hash-element and scalar?
by LanX
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |