http://qs321.pair.com?node_id=11105127


in reply to Re: Expanding environment variables from ini file
in thread Expanding environment variables from ini file

That is a clever and interesting approach to that problem. For my situation I am able to use a function in a module I created to set the variables in the environment at the top level script. My predecessor had the batch files read the ini over and over but I'm planning to just test to see if a key is already set before re-reading the ini file.

package custom_environment; use strict; use warnings; use Exporter; our @ISA = qw(Exporter); our @EXPORT = qw( setup_modelbuild_environment ); #################################### ### Setup environment variables from the mm config file. ### sub setup_modelbuild_environment { $ENV{test_setup_vars} = "test123"; print "sub setup_modelbuild_environment : test_setup_vars = $ENV{t +est_setup_vars}\n"; } 1;