in reply to Concurrent Whiles?

When you need two (or more) concurrent loops like this, you can use threads. However, in this case you can just combine them into a single loop, as follows (untested):

my $time_slept = 0; while (1) { ... $time_slept += sleep $config{Database}->{Sleep}; if ($time_slept >= 7200) { DB_Backup(); $time_slept = 0; } }

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,

Replies are listed 'Best First'.
Re^2: Concurrent Whiles?
by dcthehole (Novice) on Sep 08, 2013 at 03:12 UTC

    Yes, that does help. Thank you.