Your problem is that Perl scopes according to packages. It is not that %prod is in a different file. It is that it is in a different package. The cheesy solution is to just make %prod in your current package be the copy in the root package, which is called main: