in reply to Re: substitution in a string
in thread substitution in a string

This solution works a treat provided that there are no underscores as part of the environment value. Unfortunately, for many systems these are common as parts of pathnames. A variable such as oracle_home=/local_oracle/ would turn into oracle.home=/local.oracle/, which may not be desirable.

If you were to split the keys from the values beforehand, then a map is an excellent way to perform the alterations.

Cheerio,