benedicth has asked for the wisdom of the Perl Monks concerning the following question:
I understand this is wrong but can't find an explanation for using variables as hash values. thanks for your help pros.$test = 'test'; %hash = ( t => $test); $change = 'changed'; $hash{t} = $change; #I just want to change $test to 'changed' not $hash{t} to $change
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Changing a variable which is a value of a hash
by choroba (Cardinal) on Apr 16, 2015 at 15:46 UTC | |
by jeffa (Bishop) on Apr 16, 2015 at 15:50 UTC | |
by choroba (Cardinal) on Apr 16, 2015 at 19:15 UTC | |
by benedicth (Initiate) on Apr 16, 2015 at 15:55 UTC | |
Re: Changing a variable which is a value of a hash
by Your Mother (Archbishop) on Apr 16, 2015 at 15:56 UTC | |
Re: Changing a variable which is a value of a hash
by Laurent_R (Canon) on Apr 16, 2015 at 17:35 UTC | |
Re: Changing a variable which is a value of a hash
by GotToBTru (Prior) on Apr 16, 2015 at 15:48 UTC | |
by benedicth (Initiate) on Apr 16, 2015 at 15:56 UTC | |
A reply falls below the community's threshold of quality. You may see it by logging in. |