in reply to Scope Puzzle

My understanding was helped by this variant (note the 'our'):

our $string = 'foo'; my $variablename = 'string'; my $temp = ${$variablename}; print $temp, $/;

Prints:

foo

DWIM is Perl's answer to Gödel