Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Hash element access -dereferenced hashesby reaper9187 (Scribe) |
on Dec 06, 2012 at 10:00 UTC ( [id://1007506]=perlquestion: print w/replies, xml ) | Need Help?? |
reaper9187 has asked for the wisdom of the Perl Monks concerning the following question:
Hi everyone,
I'm kinda new to perl and i was working with hashes for developing a particular application. Here goes my problem :
I have two hashes ,say (key1,value1) and (key2,value2)... What is the best possible way to associate key 1 with value 2. ( want to print them). value 1 is the key for hash 2. I tried to to do it by using something like $hash2{$hash1{$key1}} to try to extract the value but it returns a null character but works perfectly when you plug in the scalar value of value2 instead of $hash{$key1}. Please help ..!! thank you..
Back to
Seekers of Perl Wisdom
|
|