For these true global variables you must..

use vars qw($these $are $the $true $global $vars);

in your main program.

or if you are using perl 5.6 you can use 'our'..but then older perl versions
will not understand.

Jack

-----Original Message-----
From: Gary Nielson [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, February 20, 2001 10:19 AM
To: Perl Win32 Users List
Subject: Trouble my "my" variables in separate configuration file


Hi, there:

Trying to understand why, if I declare a bunch of my variables in a file,
everything works fine. But when I put them in a separate configuration
file, such as variables.cfg, and import it with either "require" or "do",
perl complains -- using strict -- that:

Global symbol requires explicit package name

Does "my" not work in separate files that are imported? Ho do I declare
variables and their values in a separate configuration file, using "use
strict?" Otherwise, I need to include all of the same variables in several
scripts!

Any help appreciated.


_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to