package MyPackage; our @Settings; sub whatever { # Use any externally supplied settings. print join("\n", @Settings), "\n"; } #### package MyConfig; # Set up code goes here ... # Now switch to the other package and set values package MyPackage; our @Settings = (qw/a ab cdef ghi/);