Do you have access to a DNS server feom your machine?

Run nslookup from the command prompt. Does it return the name of a DNS
server, or does it say something like "default servers are not available".
That could be your problem if it's timing out.

John

-----Original Message-----
From: Vasileios Delis [mailto:[EMAIL PROTECTED]]
Sent: 20 September 2001 11:24
To: beginners
Subject: net::dns module


Hi there

trying to understand the module I tried the following example (also in the
module'es refrence):

use Net::DNS;

  $res = new Net::DNS::Resolver;
  $res->debug(1);
  $query = $res->search($ARGV[0]);
  
  if ($query) {
      foreach $rr ($query->answer) {
          next unless $rr->type eq "A";
          print $rr->address, "\n";
      }
  }
  else {
      print "query failed: ", $res->errorstring, "\n";
  }

but it doesnt seem to work ('query timed out'), nomatter if I'm asking for
an internal or an external domain. I'm currentry on a NT workstation, using
DHCP service. Does anybody know the reason for this and how can I come over
it? I should write a program using this module and I must be able to test it
on my workstation...

Thanks in advance!

vas.




-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--------------------------Confidentiality--------------------------.
This E-mail is confidential.  It should not be read, copied, disclosed or
used by any person other than the intended recipient.  Unauthorised use,
disclosure or copying by whatever medium is strictly prohibited and may be
unlawful.  If you have received this E-mail in error please contact the
sender immediately and delete the E-mail from your system.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to