in reply to Net::Ping issues
Or you can face situation when some host dead and alive (if first ping fails and second successful) or neither dead nor alive (if first ping succeeds and second fails).foreach $host (@host_array) { if( $p->ping($host, 2) ) { print "$host is alive.\n"; } else { print "$host is dead\n"; } }
|
|---|