Prasanna Kothari,
Excellent, I've seen the mistake I made with my
program now thanx to yours! Cheers.
One more thing, Is there any module that allows you to
log network errors whilst the program is pinging??
Thanx
Ben
___
Do you Yahoo!?
Win 1 of 4,0
Ben Crane wrote:
> Hi all,
>
> I need to set the ping command running for a few hours
> on my machine, and record (the exact time/date) then
> the ping function fails.
>
> I have tried putting a script together but no joy.
> Does anyone have a script like this that I could
> please "borrow"?? I n
hi,
Have a look at the module Net::Ping for more options.
here's a sample script that pings a host once and prints the result.
#!/usr/bin/perl -w
use strict;
use English;
use Net::Ping;
my $host = "";
my $p = Net::Ping->new("icmp");
my $val = $p->ping($host);
if(!($val)) {
my @arr = localtime()
Hi all,
I need to set the ping command running for a few hours
on my machine, and record (the exact time/date) then
the ping function fails.
I have tried putting a script together but no joy.
Does anyone have a script like this that I could
please "borrow"?? I need to run the checks this
afterno