i'm using a hash in my main script to store some configuration info:
#!/usr/bin/perl -w
use strict;
require "subs.pl";
# declare and define config
my %CONFIG = ('key' => 'value');
and in a library file, i store some subroutines that use this config hash:
sub test { print $CONFIG{'key'}; }
1;
this, of course, doesnt work. the
test() sub doesnt see the
%CONFIG hash, because its declared local with
my() in a whole other file.
i've tried declaring the hash with
our(), to no avail...how can I accomplish this?