in reply to RE: Re: Detecting dial-up connections
in thread Detecting dial-up connections
$minuits_to_wait = '5'; $last = my $last2 = 0; while (1) { if ((time - $last) > 60 * $minuits_to_wait ) { $ret = sometypeof-ping-routine(); if ($ret eq '1') { get_somthing(); } elsif ($ret eq '0') { print "Not connected\n"; } } sleep(60 * $minuits_to_wait); }
|
|---|