general retry function
- From: konfera@xxxxxx (Ing. Branislav Gerzo)
- Date: Tue, 27 Sep 2005 23:20:00 +0200
Hi Perlers,
I have one nice question for you, I was run into common problem:
need to repeat certain number of times something, until is succesful.
For example - download webpage, FTP upload, connect to some host and
so on.
I ask you for some general (or it can't be possible - FTP upload)
function, for example I will call:
ftpupload($cfg, 10);
will call ftpupload() with $cfg ($cfg->{user}, $cfg->{pass},...)
and 10 is number of retries.
Could be anyone so nice and write it ? I have some snippets here,
using eval {} and catch errors with calling recursive sub, but I don't
think thats the best option.
Thanks in advance.
/brano
.
- Follow-Ups:
- Re: general retry function
- From: Wiggins d'Anconia
- Re: general retry function
- From: Chris Devers
- Re: general retry function
- Prev by Date: Block Confusion
- Next by Date: RE: Shift Question
- Previous by thread: Block Confusion
- Next by thread: Re: general retry function
- Index(es):