You were quite clear, but you seem to think that we are going to write you such a script. We don't.
We help you to write such a script by yourself, and the link that Corion posted has a quite verbose and well explained example how such a thing can be done - with a few small differences (they ping a host and don't copy files).
Did you even try to take that script and adapt it to your needs?
BTW If your server kills CGI scripts after 15 minutes (and that can't be stopped by forking off into the background) that's not a perl problem, but one of your server configuration.
|