Hi,
I have a list of constants that I want to re-use in several *.pl and *.pm files e.g.
# boolean values
use constant TRUE => 1;
use constant FALSE => 0;
I want to put this stuff in an external file and not copy/paste it into every file that uses it. Sort of like a C++ header file.
Can anyone tell me what the best way of doing this would be? I've tried doing
do '/data/home/vovin/config/foo.cfg' or warn "failed to parse $!";
but it didn't work correctly. Any help would be much appreciated. Thanks.
I have a list of constants that I want to re-use in several *.pl and *.pm files e.g.
# boolean values
use constant TRUE => 1;
use constant FALSE => 0;
I want to put this stuff in an external file and not copy/paste it into every file that uses it. Sort of like a C++ header file.
Can anyone tell me what the best way of doing this would be? I've tried doing
do '/data/home/vovin/config/foo.cfg' or warn "failed to parse $!";
but it didn't work correctly. Any help would be much appreciated. Thanks.