If they are configuration vars, then I would go with
rinceWind's suggestion of the
Config::* modules.
If you have groups of scripts with that same piece of code, you can just stick it in a common script an
require it.
Script1.pl
require 'common_stuff.pl';
&common_function;
common_stuff.pl
sub common_function(){
#...code goes here...
}