in reply to packages within the same file.

Variables declared with my are lexical. From the perldoc of package:

A package statement affects only dynamic variables--including those you've used "local" on--but not lexical variables

-derby