jose_m has asked for the wisdom of the Perl Monks concerning the following question:
hello Monks, can someone help me query dns for a part of a hostname and return a list of hosts that match into an array? i can query using socket but it seems to only return the subdomain
#!/usr/bin/perl use Socket; use IO::Socket; use warnings; sub getWin { @win = gethostbyname("win") or die $!; print "@win\n"; } &getWin;
this is not retuning a list of hosts names win01.xx.com does anyone see the issue? also net::dns does not seem to be able to return a list of hostnames, is this true? thanks jose.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: query dns by hostname
by skx (Parson) on Mar 25, 2014 at 12:50 UTC | |
|
Re: query dns by hostname
by lithron (Chaplain) on Mar 27, 2014 at 00:20 UTC |