in reply to Swapping object variables

I like this idiom in my standard test tied filehandle code:
my $self = shift; return substr($$self, 0, length($$self), '');
That does assume you have four-arg substr available, though it predates 5.6.