just define all vars in ur conf file with a scope reslution eg $global::test = 'hello';
Octavian Rasnita wrote: > Hi all, > > Is it possible to use "use strict;" if I get the variables from a > configuration file? > > I've tried: > > use strict; > require "f:/xxx/config.txt"; > > #In the configuration file I have a line like my $test = "test test test"; > > print "Content-type: text/html\n\n"; > print $test; > > This gives me an error that I should define the variable $test. > I don't want to define it in the script but in the configuration file. > However, if I define it in the script with my $test; the script prints an > empty string and doesn't take the variable from the configuration file. > > Is it possible to use strict, or it is necessary to use "no strict;? > > Another problem, maybe bigger is that even though the script is running > fine, it give me errors in the log file telling me that the variable $xxx > and $yyy, ... is used only once. > > Is there a good method to define variables for more scripts in a single > configuration file? > I don't want to store my email address and other settings in each script > because I may change that address, and then I will need to modify a lot. > > Thank you. > .... or I have another solution for defining all the variables in a > configuration file? > > > Teddy, > [EMAIL PROTECTED] > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]