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

tbblake has asked for the wisdom of the Perl Monks concerning the following question:

I just wrote a large set of perl scripts for a personal project. To avoid my own typoes and what not I've gotten into the habit of using "use warnings;" and "use strict;" along the way. So now that I'm done...I've found that I have a dozen or so "common" variables in the scripts that whenever I change in one, I need to change in the others. I'd like to go back into them, delete the "my" declarations in all of them, and just drop them into a common script. I know there are such methods as creating modules, and reaching into the module's namespace for variable values, but that would be a major re-write. In the end I want to do as little re-coding as possible. I'm hoping for something as simple as a "require" or "use" statement can just replace a block of variables at the top of the script. Any ideas?