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.
|
|---|