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