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.
In reply to Re: DNS lookup and specify DNS server to use
by ikegami
in thread DNS lookup and specify DNS server to use
by g_speran
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |