'my' variables are lexical to the enclosing block. Here, since the variables are declared in the MAIN package, outside of any block, they are global, or visible to all all blocks within the package MAIN.
Almost. They have file scope, they're global to the file. See Lexical scoping like a fox,
$ cat foo1.pl
my $foo = qq{i'm in main too ${\__FILE__}\n};
sub foo1 { print $foo; }
$ cat foo2.pl
my $foo = qq{i'm in main too ${\__FILE__}\n};
sub foo2 { print $foo; }
$ perl -e " require $_ for qw/ foo1.pl foo2.pl /; foo1(); foo2(); "
i'm in main too foo1.pl
i'm in main too foo2.pl