Re: Recording Ping responses in perl part 2

2004-08-24 Thread Ben Crane
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

RE: Recording Ping responses in perl

2004-08-23 Thread Bob Showalter
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

Re: Recording Ping responses in perl

2004-08-23 Thread Prasanna Kothari
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()

Recording Ping responses in perl

2004-08-23 Thread Ben Crane
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