If the other answers haven't solved your problem(s), I'll take my shot (which is the best I can do without more detail).
My guess is that you are trying to use
my (lexical) variables globally. Unfortunately, lexical variables are not technically in
any package, and their scope does not reach outside of the file they appear in (even if that file is required into another file). Therefore they will show up as undefined.
If your portion of the code is in subroutines, then I would suggest you follow
Ryszard's suggestions, and pass all the variables you need to the sub, then use the return from the sub. You can then use
my variables internally to the sub with no problem.
Otherwise, you'll probably have to use 'real' globals, defined (for example) with
use vars(). But, in my opinion, that would be a design mistake. My guess is that your code does not
use strict. Could you give us a little more detail on the current design (maybe even some code) to make it easier to give helpful recommendations?
Impossible Robot