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();
In reply to Using Net::Ping
by Rhose
in thread PING taking too long
by Hydro
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |