in reply to use vars in a require()d file

require fires at run-time. Until then, Perl has no way of knowing that you've declared your variables in the other file.

Luckily, a BEGIN block will fix things:

BEGIN { require 'foobarbaz.pl'; }
It's not that the variables are hidden, it's just that Perl doesn't see them in time to avoid the warning, unless you tell the compiler to read the file before it does the warning check.