Skip to content

Commit

Permalink
Modified the expand function in Perl_Config.pm so that environment va…
Browse files Browse the repository at this point in the history
…riables will be correctly expanded in the string if the variables are defined.
  • Loading branch information
gmao-jstassi committed Dec 26, 2024
1 parent 5ebdbf3 commit 4abd002
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion GMAO_etc/Perl_Config.pm
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,9 @@ sub expand {
#------------------------------------------
foreach $var (@vars) {
($varname = $var) =~ s/[\$[{}]]//g;
($varname = $var) =~ s/\$//; # remove '$'
$varname =~ s/\{//; # remove '{'
$varname =~ s/}//; # remove '}'
$val_ENV = $ENV{$varname};
$val_eval = eval($var);
Expand Down

0 comments on commit 4abd002

Please sign in to comment.