http://qs321.pair.com?node_id=611674

Nalina has asked for the wisdom of the Perl Monks concerning the following question:

Hi
Can I use a variable for value of a hash? for ex
$dw = "dw_urg"; %$dw_TG = qw( var $dw_VAR str $dw_STR mkt $dw_MKT ); foreach $key (keys %$dw_TG) { print "$$dw_TG{$key} -> $key\n"; }
This displays
$dw_MKT -> mkt $dw_STR -> str $dw_VAR -> var
but i need $dw to be replaced by its value. Please help