in reply to Re: perl daemon
in thread perl daemon
while (1) { if (-f $fn) { ## a file was found, do something DoSomething(); ## then exit exit; } ## pause 5 minutes before checking again sleep 300; }
really be:
while (1) { if (-f $fn) { ## a file was found, do something DoSomething(); ## then break the loop break; ## <<-- not exit(); } ## pause 5 minutes before checking again sleep 300; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: perl daemon
by Fastolfe (Vicar) on Feb 08, 2001 at 22:28 UTC |