in reply to Top level my vars and their global use in a file

Chapter 4 of the third edition of Programming Perl ("the Camel book") states:
lexical variables are totally hidden from the world outside their immediately enclosing scope.
Because your subroutine is defined inside the scope where you defined your lexical (my) variable the behavior you observe is normal and expected.

If, admirably, you wish to encapsulate your main program's lexical (my) variables from your subroutines, one way to do it is simply to enclose your main program in braces. That removes your subroutine from the scope that contains your lexical variables.

Thus the following program fails with the error "Global symbol '$myString' requires explicit package name.":

use strict; {my $myString = "hello"; mySub();} sub mySub{ print $myString; }