http://qs321.pair.com?node_id=746282


in reply to when no ping say 'moo!'

I can't test (no win32 here), but I would replace the ping command with Net::Ping
use Net::Ping; ... sub controlla{ my $ok = 0; my $p = Net::Ping->new("icmp"); my $tries = $conteggio; while ($tries-- > 0) { $++ok if $p->ping($host); } return $ok; }