botha has asked for the wisdom of the Perl Monks concerning the following question:
This works but I would like to change the server it uses to resolve the ip from within the code. My research has proved futile.#!/usr/bin/perl -w use strict; use Socket; foreach my $ip (@ARGV) { my $sin = inet_aton($ip); my $name = gethostbyaddr $sin, AF_INET; print "$ip => $name\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How do I change servers while using gethostbyaddr
by fokat (Deacon) on Dec 15, 2001 at 03:59 UTC |