my $test="my_variable_name"; #imagine this is a hash key my $default_value="the value I set"; #while this is the hash value my %hash = ($test => \$default_value); print "the value of \$$test = ${$hash{$test}}\n"; ${$hash{$test}} = "A new value"; print "the value of \$$test = ${$hash{$test}}\n";