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, $/; [download]
Prints:
foo [download]