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


in reply to How to force one variable to be an alias to another?

Perl 5.22 introduced the refalias feature. The simplest solution to the example is

use v5.22; use warnings; use feature 'refalias'; # Silence warnings if desired: no warnings 'experimental::refaliasing'; my ($x, $y); \$x = \$y; # alias here $x = 5; say $y; # prints 5