Problems? Is your data what you think it is? | |
PerlMonks |
Re^6: sub calls and memory useby Anonymous Monk |
on Nov 16, 2019 at 15:35 UTC ( [id://11108790]=note: print w/replies, xml ) | Need Help?? |
In Perl you are generally better off translating tail calls to loops.
I replaced that recursive sub with a while loop and yeah, makes more sense, less code, and no memory bomb. ThanX Concerning your memory growth, we'd need to know how you declared the "global var". Sorry I was mistaken about that :-/
In Section
Seekers of Perl Wisdom
|
|