in reply to Changing a variable which is a value of a hash
Use a reference:
$test = 'test'; printf "Was: %s\n",$test; $hash{t} = \$test; $change = 'changed'; ${$hash{t}} = $change; printf "Now: %s\n",$test;
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Changing a variable which is a value of a hash
by benedicth (Initiate) on Apr 16, 2015 at 15:56 UTC |