in reply to tie and untie old value

After untie, you should not count on a variable's pre-tie content being still there.

In practice, this mostly works for arrays and hashes, and mostly not for scalars.