Airman wrote:
> Does anyone know how to reference different DNS servers when
> using gethostbyname. I want to check up to three different
> nameserver for consistency checking.
Use Net::DNS module instead. gethostbyname() isn't really designed for that
kind of thing.
--
To unsubscribe, e-mail: [
I think gethostbyname uses the nameservers listed in
/etc/resolv.conf but what does that have to do with perl?
try man gethostbyname
HTH
> -Original Message-
> From: Airman [mailto:[EMAIL PROTECTED]
> Sent: Monday, June 09, 2003 6:34 PM
> To: [EMAIL PROTECTED]
> Subj
Does anyone know how to reference different DNS servers when using gethostbyname. I
want to check up to three different nameserver for consistency checking.
Thanks,
Glen
Thank you Oliver. This is what I want. It is faster than my nslookup
script. Thank you.
__
William Ampeh (x3939)
Federal Reserve Board
--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi,
whats wrong with using gethostbyaddr from the Socket package? A lot easier,
faster and slicker. Have you looked at this?
perldoc -f gethostbyaddr
use Socket;
sub dnsLookup {
my $ip = shift;
$iaddr = inet_aton($ip); # or whatever address
$name = gethostbyaddr($
Can anyone tell me how to perform a dns lookup using perl?
I am using nslookup, what is a better way to do this?
Here is a snippet of my code :
#!/opt/local/bin/perl
%dns = &NSLOOKUP($ARGV[0]);
print "\n ip = $dns{Address} host = $dns{
I think you can use gethostbyaddr() for this.
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Monday, March 18, 2002 1:19 PM
To: [EMAIL PROTECTED]
Subject: DNS lookup
I need to find a way to do a DNS lookup of a list of ips (at least 250
entries), get their
I need to find a way to do a DNS lookup of a list of ips (at least 250
entries), get their corresponding hostnames and produce a report.
It sounds very simple, an I implemented it with "nslookup ip" (loop for 250
times).
I tried "host -al" (which produces a long list of hos