http://www.perlmonks.org?node_id=94628


in reply to Buffer overflow

You seem to be calling several subroutines in your script. It is difficult to know what they might be doing without the complete code.

Here's my guess: You have a memory leak (perhaps from using global variables), or if you are opening files and not closing them, you will eventually reach the max limit on file descriptors.

Try calling your perl script from a shell script loop:

#!/bin/ksh TIMER=10 while : do perl script.pl sleep $TIMER done
If that is not an option, you can also create another perl script that uses 'do' function to call this script:
my $TIMER = 10; while (1) { do "/path/to/your/script.pl"; sleep $TIMER; }
/prakash