in reply to Re^2: Garbage collection at subroutine return
in thread Garbage collection at subroutine return

You might consider using OO techniques to "hide" the global. Make the global into a data member (bless it) and the sub into a method. Of course you then get hit with access costs so you may not end up with a performance win. However OO can help refactor code and that may be a key to unlocking the real problem.


DWIM is Perl's answer to Gödel
  • Comment on Re^3: Garbage collection at subroutine return