in reply to Re: Re: Finding hostname aliases
in thread Finding hostname aliases

Thanks for all the pointers - now understand a lot more about how to properly use Net::hostent. However, my problem still remains. For instance, if I use the code snippet supplied my shenme, I get exactly the output promised. But my problem is that I would like to be able to give 'a562.cd.akamai.net' as the argument and have it return 'www.microsoft.com' as an alias. Alas, this does not happen and it appears that this is indeed the way this module (Net::hostent) is intended to work. So I am still wandering in the dark :( Thanks for all your efforts - Mark

Replies are listed 'Best First'.
Re: Re: Re: Re: Finding hostname aliases
by liz (Monsignor) on Sep 12, 2003 at 14:16 UTC
    Hope this analogy will help you get out of the dark.

    "a562.cd.akamai.net" is a description of how to get to one or more IP-numbers (Rome).
    "www.microsoft.com" is another description to get to the same IP-number(s) (Still Rome).

    You're asking, given "Rome", to be able to tell all the possible ways to Rome. There could be one, there could be thousands. You won't be able to find out from "Rome". There is no way to know, unless you start trying them out one by one (in a Shakespeare monkey manner).

    Another analogy. You call yourself "marknm". But can you know what other people call you unless they tell you? No. Not unless your psychic. And even that could be considered them telling you what they call you.

    Hope this clears things up.

    Liz