Connecting Tech Pros Worldwide Forums | Help | Site Map

How to: Hash reference using text variable

Newbie
 
Join Date: Jul 2006
Posts: 2
#1: Jul 23 '06
Let's say you have a hash of hashes and you access one of its values like this

print "$myhash->{ParentKey}->{ChildKey}";

and that actually prints: myValue

But now, you want to store the access path in a text variable like this

$txtvar = "{ParentKey}->{ChildKey}";

and you want to print myValue,

How in the wolrd you do that? :confused: Hope you can help me

Reply


Similar Perl bytes