perldough has asked for the wisdom of the Perl Monks concerning the following question:
I have inherited a fairly large script that fails to run in its entirety due to memory issues. The script has hundreds of variables and I have no idea which one might be to blame...
Ideally, I would like to be able to output the refcount of each variable in the script at various points throughout the program. This way, I could see what needs to be undef'ed.
Is there a function that will return a hash (or something) containing the refcount (or perhaps, as a backup the memory usage) of all the variables in the script?
Thanks,
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Obtaining refcount for all variables
by bulk88 (Priest) on Aug 01, 2012 at 00:22 UTC |