> > From:       Najamuddin, Junaid[SMTP:[EMAIL PROTECTED]]


It is not ideal but will count each fail and if it reaches three it
will execute whatever you want. I think you can change ping to only
ping so many times. Hope it helps.


#!PERL

use strict;
use warnings;

my  $count = 0;
my $line;
my @out;

@out = `ping 192.168.210.1`;

foreach $line (@out)
        {       
        if ($line =~ /.*Request timed out.*/)
        {
        ++$count;       
        }

        if ($count > 3 ){
        
        print STDOUT "CODE GOES HERE TO SEND MAIL";
        
        }

};


__________________________________________________
Do You Yahoo!?
Yahoo! Health - your guide to health and wellness
http://health.yahoo.com

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to