use strict; use warnings; use feature 'say'; my $n = 42; # \ takes a reference to a variable my $ref = \$n; # $$ref reads through it say $$ref; # writing through the ref changes the original $$ref = 99; say $n;
\$ makes a ref, $$ derefs