in reply to Re: PING taking too long
in thread PING taking too long
use strict; use Net::Ping; use constant TIMEOUT => 1; my $mNetPing = Net::Ping->new('icmp',TIMEOUT); foreach ('host1', 'host2', '172.20.41.152') { print $_,($mNetPing->ping($_) ? ' is alive' : ' is not alive'),"\n"; } $mNetPing->close();
|
|---|