Matthew Brooks <[EMAIL PROTECTED]> wrote:

> I have a script that does a require like:
> 
> #!/usr/bin/perl -w
> use strict;#<--- always
> 
> require "/home/some/other/directory/file.conf";
> 
> #yada-yada-yada...
> 
> 
> and in this file I have a few configuration variables defined like:
> 
> my $name = "Matthew";
> my $setting = '1';
> 1;
> 
> but when I run the script it tells me that the global variables $name
> and $setting need to have their packages declared. Can anyone tell what
> I'm doing wrong here? I tried eliminating the use of "my" in the
> required file thinking it might be a symbol table thing and I even made
> sure the require was working with require || die in case the require
> just wasn't executing right... any ideas would be appreciated.

Take a close look at the documentation for "my" and then maybe the
Exporter module.

HTH
-John

Reply via email to