Quantum Mechanic wrote: [...]
So I think my problem is a memory leak
somewhere. There is one main recursive routine, which
creates a number of "my" variables. I suspect that I'm
somehow keeping a reference to a variable that I
shouldn't be, and that's causing my memory problem.
I suggest you stay as far away from recursion in Perl as possible. At least if you are memory or CPU limited. Perl keeps the lexical scope on a stack until you return from the recursion. If it's deep, you're, well, in deep trouble.
If you're using tail recursion, you may get rid of the problem by using "goto sub". (perldoc -f goto)
[...]
HTH, Steffen -- sub'_{q} tsuJ}}_();sub's{seek+DATA,0,0}sub'p{print&_}sub'r{reverse$_[0]} @_=(('')x2,split" ",<DATA>);s!!&s,$_=<DATA>;s/}.*?}/$_[$s+1]/ if$s;s/(}.*?})/r$1/e;eval$_;p,[EMAIL PROTECTED]; __DATA__ } rehtona} } lreP} },rekcah}