in reply to Re^2: Passing a list as a subroutine's return value ( list of HTML::Element objects )
in thread Passing a list as a subroutine's return value ( list of HTML::Element objects )

In general, you don't have to worry about that. As long as you hold a reference, the object will be kept alive. But you called a function which frees the tree including all of its nodes, which it does by hollowing out any existing references to its nodes.

  • Comment on Re^3: Passing a list as a subroutine's return value ( list of HTML::Element objects )