in reply to Changing a variable which is a value of a hash

Your question is not very clear to me, but, contrary to others who suggested to use references, I understand that you do NOT want the content of the hash to change when you change some variables in the environment. If you do this:
$test = 'test'; %hash = ( t => $test); $test = 'changed';
the content of the hash does not change, it is still 'test', because the assignment:
%hash = ( t => $test);
is storing into the hash the content of the $test variable at the time this assignment is done. Modifying the $test variable afterwards will not modify the content of the hash.

But if you do:

$change = 'changed'; $hash{t} = $change;
then, of course the value in the hash will be modified because that's precisely a common way to modify the content of a hash for a given key.

Je suis Charlie.