Re: Resolve hostname by specified nameserver

2009-10-24 Thread rocku
No, it's not pure Perl. It uses some XS code. I can't use it since in my project I am limited to standard ActivePerl modules. I could, of course, copy it if it wasn't for this C code. Chris Wagner pisze: > Why can't u use Net::DNS? It's pure Perl so there shouldn't be any trouble > using it any

Re: Resolve hostname by specified nameserver

2009-10-24 Thread Chris Wagner
Why can't u use Net::DNS? It's pure Perl so there shouldn't be any trouble using it anywhere on Windows. It doesn't have to be installed globally to use it. U can copy it into ur own directory and do a use lib in ur script to load it. Even in the worst case scenario u can copy all of the Net::D

Re: Resolve hostname by specified nameserver

2009-10-23 Thread Bernard Tremblay
On Tue, 20 Oct 2009 16:34 +0200, "rocku" wrote: > Hello, > I need to resolve a hostname by a specified nameserver. Currently I am > using nslookup throught backticks, but it's output differs slightly > between Windows versions and is hard to parse. I wanted to use Socket > and something like i

RE: Resolve hostname by specified nameserver

2009-10-21 Thread BRZEZINSKI, PAUL
n...@listserv.activestate.com] On Behalf Of rocku Sent: Tuesday, October 20, 2009 10:35 AM To: perl-win32-users@listserv.activestate.com Subject: Resolve hostname by specified nameserver Hello, I need to resolve a hostname by a specified nameserver. Currently I am using nslookup throught backticks,

Re: Resolve hostname by specified nameserver

2009-10-21 Thread rocku
Yes, the reason is that I am limited to standard ActivePerl modules. Serguei Trouchelle pisze: > rocku wrote: > >> I am aware about Net::DNS, >> but unfortunately I cannot use it because it's not standard in >> ActivePerl 5.10. > > Is there any reason not to run "ppm install Net::DNS" to inst

Re: Resolve hostname by specified nameserver

2009-10-20 Thread Serguei Trouchelle
rocku wrote: > I am aware about Net::DNS, > but unfortunately I cannot use it because it's not standard in > ActivePerl 5.10. Is there any reason not to run "ppm install Net::DNS" to install it? -- Serguei Trouchelle ___ Perl-Win32-Users mailing li

Re: Resolve hostname by specified nameserver

2009-10-20 Thread Rafał Pocztarski
>    my $res = Net::DNS::Resolver->new(nameservers=>[$nameserver]) or die; Sorry, I overlooked the part where you wrote that you can't use Net::DNS... Just ignore my message. Rafał Pocztarski ___ Perl-Win32-Users mailing list Perl-Win32-Users@listserv.A

Re: Resolve hostname by specified nameserver

2009-10-20 Thread Rafał Pocztarski
2009/10/20 rocku : > So my question is - how to query a specific nameserver about a DNS 'A' > record? See the first example in the Net::DNS manpage: http://search.cpan.org/~olaf/Net-DNS-0.65/lib/Net/DNS.pm#EXAMPLES Just change: my $res = Net::DNS::Resolver->new; to: my $res = Net::DNS

Resolve hostname by specified nameserver

2009-10-20 Thread rocku
Hello, I need to resolve a hostname by a specified nameserver. Currently I am using nslookup throught backticks, but it's output differs slightly between Windows versions and is hard to parse. I wanted to use Socket and something like inet_ntoa(inet_aton('hostname')) but this way I have no opti