Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
Any help would be appreciated.use Net::Nslookup; open(INFILE, 'os.txt') || die("cannot open file: ".$!); my @lines = <INFILE>; my $switch; foreach $switch(@lines) { my @output = nslookup(host => $switch, server => 10.1.10.42, type => "A"); (my $name, my $ip) = (split /:/, $output[3]); print "$ip\n"; } close INFILE;
Edited by planetscape - fixed code tags
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Nslookup using a different DNS server
by johnnywang (Priest) on Nov 14, 2005 at 20:06 UTC | |
|
Re: Nslookup using a different DNS server
by japhy (Canon) on Nov 14, 2005 at 20:30 UTC |