develooper Front page | perl.perl5.porters | Postings from February 2000

Re: fixing Sys::Hostname

Thread Previous | Thread Next
Tom Christiansen
February 8, 2000 07:50
Re: fixing Sys::Hostname
Message ID:
>>    % grep localhost /etc/hosts
>>	localhost	

>Which is exactly my point ;-)  there is no alias there, just the one name
>and that makes 'localhost' the official name of the address.

But I've never heard of "localhost" ever being anything but
"127.1" as an address.  It's extremely expected.

>If I do gethostbyname('localhost') on such a machine I get 'localhost'
>back. But I would "like" to get back "pluto" or ""

>Thus my entry "should" be :

> pluto localhost	

>and yours "should" be : 

> chthon localhost	

I think not.


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About