[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Getting hostname



Hi,

> A possibility is to use perl, it has a easily accessible gethostbyname
> implementation.. (use Socket;) i think.

use Socket; 
$name=gethostbyaddr('134.169.54.170',AF_INET); 
$name =~ s/\..*//; 
print "$name\n"'

works fine, but somebody said to me: Little tools for little problems...

I think, dig is the better alternative.

Greetings
Holger



Reply to: