Fellow Monks,
I am trying to create a script to track and store domain information. I'm hoping to store the information in a hash by domain level. Kind of like:
.com->domain1->subdomain ->domain2->subdomain ->subdomain2 .net->domain1->subdomain ->subsubdomain1->subsubsubdomain1 ->subsubsubdomain2
I have the URI elements broken out into an array (rootdomain,domain,subdomain,...) and I want to insert them into a hash.
How can I check each element to tell whether it should create a new domain or go into an appropriate existing one and keep checking if it already exists.
Is there some funky statement I can use to check each level of domain to see if it's level exists. The answer is obvious to me if it is a fixed number of sub-domains but I can't figure out how to do it with different numbers of domains. (ie. www.perlmonks.com or seek.wisdom.here.perlmonks.com)
Thoughts?
Thanks in advance for your assistance.
In reply to storing domain info in hashes of hashes by ajefferies
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |