in reply to Re: Re: derefrencing an object
in thread derefrencing an object
That shouldn't be a problem. The object should still exist as long as there's a reference to it. It's hard to say what's wrong looking at just these few lines. What I would probably try next is to add:
right before line 62.use Data::Dumper; print Dumper($node);
Update: Given what sgifford says below, I would suspect either (1) you have another code path which adds to @nodes, or (2) you didn't change the code you were running. In fact, one reason I suggested adding the print Dumper statement was to make sure that you were changing (and saving) the right code. Don't feel too bad if this happens to you. I have to be on the guard against this all the time; it has happened to me too many times over the years. Given how Perl can search many places for a module, that I have two different versions of Perl on my PC, that I often edit on a different system from the one I run on, that there are development, test, and production environments, etc., etc. you have to keep on your toes. Eternal vigilance!
|
|---|