in reply to problem with $ARG
briefly, risolve is clobbering your $_ which is the default place to which you read the records from the DNS handle. $_ is a global variable so this self same $_ is then used as the key for your hash.
while (my $discard = <DNS>) {1}; # this would fix it
If risolve is intended to resolve the IP address of the hosts you can do this with pure Perl using gethostbyname. This will return a record that you will need to process to get human readable IP address, the linked docco explains how to do this.
Cheers,
R.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: problem with $ARG
by tweetiepooh (Hermit) on Feb 05, 2009 at 16:01 UTC | |
by ikegami (Patriarch) on Feb 05, 2009 at 16:11 UTC |