%GLOBAL = { dir1 => "/path/to/directory" dir2 => "/path/to/another" } #### [requires at the top] read_config_files(); sub read_config_files(){ #Do operations that read .txt files and load #info into the GLOBAL hash structure. } #### #A few requires... require "global.pl"; require "config.pl"; my first_directory = $GLOBAL{dir1}; etc... #### %GLOBAL = { dir1 = "/path/to/directory", dir2 = "/path/to/another", newstuff = "a string that was added", }