my $string = 'This'; my $number = 100; my $scalar_ref = \$string; # Take a reference to $string. $$scalar_ref = 'That'; # Modify the value of the scalar that # $scalar_ref refers to. print "$$scalar_ref = $string\n"; # That = That because we # changed the value of the # thing that $scalar_ref # points to, which happens to # also be what $string holds. $scalar_ref = \$number; # Change what $scalar_ref points to # doesn't change the referent values. print "$$scalar_ref isn't $string, it's $number\n";