in reply to How to include a large number of constants?

I'll just put them in a separate module:
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;
Then in your main script:
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
    Of course that is normally what I do. But I will have several hundred of your F00's and don't want to type them all into @EXPORT.