Spesh00 has asked for the wisdom of the Perl Monks concerning the following question:
use Net::Ping; $p = Net::Ping->new(); print "$host is alive.\n" if $p->ping($host); $p->close(); $p = Net::Ping->new("icmp"); $p->bind($my_addr); # Specify source interface of pings foreach $host (@host_array) { print "$host is "; print "NOT " unless $p->ping($host, 2); print "reachable.\n"; sleep(1); } $p->close();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Net::Ping with threads
by borisz (Canon) on Mar 15, 2005 at 19:28 UTC | |
by Spesh00 (Initiate) on Mar 15, 2005 at 19:50 UTC | |
|
Re: Net::Ping with threads
by sh1tn (Priest) on Mar 15, 2005 at 20:17 UTC | |
by Spesh00 (Initiate) on Mar 15, 2005 at 20:59 UTC | |
|
Re: Net::Ping with threads
by Steve_p (Priest) on Aug 06, 2007 at 14:14 UTC |