"deadpickle" <> wrote:
> I need to create a loop that will run a command every 5 seconds. I
> know I can probably do this with a series of while, for and if
> statements but I just cant wrap my head around it. Is there an easier
> way? If not, how is it suggested that I do this?
5 seconds from when to when? one start to the next start? one finish to
the next start? What will happend if it is 3 seconds or 7 seconds rather
than 5? Have you looked at "perldoc -f sleep"?
> The command I need to run is
> $fh->client_automated("x.x.x.x","port","get","some_fil e");
> It is part of a client script that uses the Net::FileShare module. If
> the program is run within a while loop it eventually has an error that
> closes the port and stops connection. This is bad because I need a
> constant connection in order to keep the data flowing between the
> computers. Any help would be very appriciated.
It isn't clear how or if this relates to your first question.
Xho
--
--------------------
http://NewsReader.Com/ --------------------
Usenet Newsgroup Service $9.95/Month 30GB