in reply to Importing vars from one script to another
Your 'constants' are not constants at all, but normal global variables. They should work as shown. In order to satisify warnings, I had to add a use Lib '.'; to your main script to let perl find the constants.pl file. I also had to add a final 1 to the constants.pl file.
I recommend using the Readonly module to make all the constants truly constant.
Bill
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Importing vars from one script to another
by edbewald (Beadle) on Dec 11, 2012 at 23:52 UTC | |
by rovf (Priest) on Dec 12, 2012 at 09:51 UTC |
In Section
Seekers of Perl Wisdom