in reply to Aliasing hash-element and scalar?
use feature 'refaliasing'; no warnings 'experimental'; my ($x, $y, %h); \$h{foo} = \$x; \$y = \$h{foo}; $x = 99; printf "%d %d %d\n", $x, $y, $h{foo}; # prints 99 99 99
Buts it's of course still an experimental feature.
Dave.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Aliasing hash-element and scalar?
by LanX (Saint) on Sep 03, 2018 at 22:38 UTC |