On Sat, Jul 14, 2001 at 03:52:32PM +0200, Joost Kooij wrote: ... > Try this instead: > > #!/usr/bin/perl -w > use Socket; > print scalar gethostbyaddr(inet_aton($ARGV[0]), AF_INET) || "(?)", "\n";
works as expected, gethostbyname works too. (I tried it in python, there I know what is done, quite unlike with the above line:) * So how come that ssh isn't sattisfied with it? The testing version reads /etc/hosts but still starts a resolve operation, that goes off to query a dns server, and then falls back to /etc/hosts. *) Okee, I looked in the docs for scalar and for gethostbyname, guessed what inet_aton would do, nah looked it up too. So now I know. -- groetjes, carel