in reply to any way to control a memory leak

If you are doing this on unix, you should consider letting cron handle the daemon portion of this task. This way, all your problems (and a lot of extra code/work) just go away.

Just strip down your script to do one pass at the monitoring, then let it exit. Set up a crontab entry which will run your script at specified intervals. For example, to run your monitoring script every 2 minutes 7x24:

% crontab -e

*/2 * * * * /path/to/monitor_script.pl >>/tmp/mon_logfile 2>&1