|
|
| There's more than one way to do things | |
| PerlMonks |
Re: Importing vars from one script to anotherby BillKSmith (Friar) |
| on Dec 11, 2012 at 23:03 UTC ( #1008419=note: print w/ replies, xml ) | Need Help?? |
|
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
In Section
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||