in reply to "cleaning out" object data

You could simply bless an empty hash with the classname of the object.
$obj = bless {}, ref($obj);


holli, /regexed monk/

Replies are listed 'Best First'.
Re^2: "cleaning out" object data
by Forsaken (Friar) on May 20, 2005 at 07:58 UTC
    That would make $obj point to a new object within its own scope, but all other references to the original object would still be intact, as would the data stored in the original object. I'll make a small example in the OP to clarify.

    Remember rule one...