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; }
In reply to Re^3: Solution to broken Net::Ping
by Anonymous Monk
in thread Solution to broken Net::Ping
by solignis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |