in reply to what is the scope of my $x=$x

An interesting question, but I wonder why the answer matters? Needing a my copy of a global is not surprising. Needing it to have the same name as the global, though? How does that arise? Why wouldn't you just make a local?