作ってみました。
#!/perl/bin/perl
use Net::Ping;
#適当なネットワークIP
$host = "210.***.***.***";
#IPを数えるカウント
$count = 0;
($sec, $min, $hou, $day, $mon, $yea, $wek) = localtime();
$yea=$yea+1900;
$mon=$mon+1;
while (1) {
if (pingecho($host, 5)) {
$count=0;
print "$yea/$mon/$day $hou:$min:$sec Count:$count IP:$host is alive.\n";
}else{
$count++;
print "$yea/$mon/$day $hou:$min:$sec Count:$count IP:$host is no return.\n";
}

if ($count > 3) {
print "$yea/$mon/$day $hou:$min:$sec Count:$count IP:$host is dead.\n";
last;
}
sleep(5);
}
while (1) {
print "モデムが停止しましたー\a\n";
sleep(1);
}