my $ref; { my $string = "123"; $ref = \$string; } ## Here $string persists.