in reply to Usage of global variables
You can then just "use Constants" in other modules and scripts.# Constants.pm package Constants; use strict; use Exporter; our @ISA = qw(Exporter); # if you want to automatically import our @EXPORT = qw(%ABC $A); # or if you want to explicitly import our @EXPORT_OK = (); our $A = "A"; our %ABC = ("A"=>1,"B"=>2,"C"=>3); 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Usage of global variables
by Anonymous Monk on Jan 04, 2005 at 09:47 UTC | |
by tall_man (Parson) on Jan 04, 2005 at 17:12 UTC |