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
Can I use a variable for value of a hash? for ex
This displays$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"; }
but i need $dw to be replaced by its value. Please help$dw_MKT -> mkt $dw_STR -> str $dw_VAR -> var
Back to
Seekers of Perl Wisdom