Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re^6: sub calls and memory use

by Anonymous Monk
on Nov 16, 2019 at 15:35 UTC ( [id://11108790]=note: print w/replies, xml ) Need Help??


in reply to Re^5: sub calls and memory use
in thread sub calls and memory use

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 :-/

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11108790]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (None)
    As of 2024-04-25 01:43 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found