in reply to cleanest/most efficient way to do this
Then you can printout the return, regex it, parse it, do whatever you want. No need to use Net::Ping or anything on a task as simple as this. Simple fill and array with all the hosts form the dumpfile, then$ping = `ping $host`; $nslookup = `nslookup $host`;
Hopefully I helped some.foreach my $host (@hosts) { $ping = `ping $host`; $nslookup = `nslookup $host'; print "Ping result is $ping \n"; print "Nslookup result is $nslookup for host $host \n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: cleanest/most efficient way to do this
by RayRay459 (Pilgrim) on Jan 26, 2002 at 01:10 UTC |