Perl: the Markov chain saw | |
PerlMonks |
Re: To Hash or Not to Hash??by l2kashe (Deacon) |
on Dec 02, 2003 at 15:38 UTC ( [id://311646]=note: print w/replies, xml ) | Need Help?? |
There is an issue here. In your test structure you are testing for $our{'ns1.t'}, but ns1.t is a value not a key. What you would need to test for would be a key.. ala
If I am reading deep enough into what you are trying to do, I think you want to also reverse your %our and %theirs hashes. ala
This way you can test for the existance of either the name of the host, or the IP address of the host.
This way its clear exactly what is going where, and what data is being worked on. As opposed to digging into the sub, figuring out what variables are used, determine their scope, etc.. use perl;
In Section
Seekers of Perl Wisdom
|
|