print "$x, ", pos($x), "\n"; { $tmp_1 = $x; $x = undef; $x = $tmp_1; # assign "old" value to $x, losing the pos() information. } print "$x, ", pos($x), "\n";