http://www.perlmonks.org?node_id=1008419


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