Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: DNS lookup and specify DNS server to use

by ikegami (Patriarch)
on Oct 11, 2021 at 16:59 UTC ( [id://11137425]=note: print w/replies, xml ) Need Help??


in reply to DNS lookup and specify DNS server to use

Neither gethostbyname nor gethostbyaddr make DNS requests (directly). They call the similarly named system calls. So not the right tools for multiple reasons.

Doing a quick search for DNS gives us Net::DNS. While it doesn't allow you to specify a server, it's just a means of accessing an instance of Net::DNS::Resolver which does allow you to specify a server.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11137425]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (2)
As of 2024-04-16 21:28 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found