in reply to Re^2: Solution to broken Net::Ping
in thread Solution to broken Net::Ping
Since I don't see an official way to change protocol choice after the fact, I recommend limiting scope with functions, however many you need , maybe
sub MahPing { my ( $host ) = @_; for my $proto ( qw/ tcp icmp syn / ){ return !!1 if Net::Ping->new( $proto, 5 ) ->ping( $host ); } return !!0; }
|
|---|