in reply to How to include a large number of constants?
Then in your main script:package Constants; use strict; use Exporter; our @ISA = qw(Exporter); our @EXPORT = qw(FOO $BAR @A %H) use constant FOO => 1; our $BAR = "bar"; our @A = (1,2,3,4); our %H = (a=>1,b=>2); 1;
use strict; use Constants; print FOO,"\n"; print $BAR,"\n"; print join(",",@A),"\n"; print "$_=>$H{$_}," foreach keys %H;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: How to include a large number of constants?
by noslenj123 (Scribe) on Apr 27, 2005 at 20:45 UTC |