in reply to Use of typeglob in package import subroutine
[...] generates a compile-time error if you access a variable that was neither explicitly declared (using any of my, our, state, or use vars) nor fully qualified.
Note that you can use
print $main::pet;
without any error, as it is fully qualified.
|
|---|