if I update a variable value later on, it will not pick up the changed value
You need to store a reference, rather than simply copying the value. Example:
my $foo = "foo"; my %hash = (foo => \$foo); print ${$hash{foo}}; $foo = "bar"; print ${$hash{foo}};
In reply to Re: Setting variables inside a hash: newbie question
by revdiablo
in thread Setting variables inside a hash: newbie question
by techgirl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |