in reply to Using require

package MyConfig; use strict; use vars qw($option); $option = 1;
Then, elsewhere:

use MyConfig; print "Option = 1" if $MyConfig::option != 0;

Replies are listed 'Best First'.
Re: Re: Using require
by kidd (Curate) on Jul 10, 2002 at 17:32 UTC
    Thanks Abigail and thanks Perrin a lot...I created config.pl a package, and it worked great...

    It's good to learn something new...I read the documentation on use vars and now I know what is that Im doing wrong....THANKS