in reply to variables / consts for different scripts
package My::Constants; use strict; use warnings; use Exporter; our (@ISA, @EXPORT); @ISA = qw /Exporter/; @EXPORT = qw /$CONNECT $DB $KEYFILES @FILES/; our $CONNECT = 'DBI:mysql'; our $DB = 'SUN'; our $KEYFILE = 'key.csv'; our @FILES = '<*.csv>'; 1;
And then in your scripts, you'd do use My::Constants.
Be aware, the code above is untested.
Abigail
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: variables / consts for different scripts
by Skeeve (Parson) on Aug 28, 2003 at 09:06 UTC |