Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Re^5: sub calls and memory useby LanX (Saint) |
on Nov 16, 2019 at 15:03 UTC ( [id://11108788]=note: print w/replies, xml ) | Need Help?? |
In Perl you are generally better off translating tail calls to loops. They are way faster and easier to understand. You never explained your use case, but your example is easily translated with redo Concerning your memory growth, we'd need to know how you declared the "global var".
Cheers Rolf
In Section
Seekers of Perl Wisdom
|
|