mhorner has asked for the wisdom of the Perl Monks concerning the following question:
Simple I know, but this is the sort of usage that I am looking for. The only problem, is strict screams about the variable not being declared. Although, if you actually remove strict, this works.# file: conf.pl $foo = 'bar'; # file: script.cgi #!/usr/bin/perl use strict; require 'conf.pl'; { ... print $foo; ... } #
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Require Centralized Variables
by broquaint (Abbot) on Nov 20, 2002 at 14:47 UTC | |
|
Re: Require Centralized Variables
by joealba (Hermit) on Nov 20, 2002 at 14:50 UTC | |
|
Re: Require Centralized Variables
by mirod (Canon) on Nov 20, 2002 at 15:21 UTC | |
by chromatic (Archbishop) on Nov 20, 2002 at 17:47 UTC | |
by adrianh (Chancellor) on Nov 20, 2002 at 20:10 UTC | |
|
Re: Require Centralized Variables
by DamnDirtyApe (Curate) on Nov 20, 2002 at 14:49 UTC | |
|
Re: Require Centralized Variables
by Abigail-II (Bishop) on Nov 20, 2002 at 15:47 UTC | |
by mhorner (Initiate) on Nov 20, 2002 at 17:02 UTC | |
|
Re: Require Centralized Variables
by YuckFoo (Abbot) on Nov 20, 2002 at 20:12 UTC | |
|
Re: Require Centralized Variables
by axelrose (Scribe) on Dec 05, 2002 at 09:47 UTC |