ovedpo15 has asked for the wisdom of the Perl Monks concerning the following question:
It works ok but I have two problems I'm trying to solve:sub resolve_env_in_path { my ($path) = @_; $path =~ s/\$\{(\w+)\}/$ENV{$1}/g; $path =~ s/\$(\w+)/$ENV{$1}/g; return $path; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to replace envs in path?
by BillKSmith (Monsignor) on May 09, 2022 at 15:06 UTC | |
by ovedpo15 (Pilgrim) on May 22, 2022 at 13:51 UTC | |
by BillKSmith (Monsignor) on May 22, 2022 at 23:07 UTC | |
by ovedpo15 (Pilgrim) on May 23, 2022 at 06:14 UTC | |
by BillKSmith (Monsignor) on May 23, 2022 at 22:35 UTC | |
| |
|
Re: How to replace envs in path?
by Anonymous Monk on May 09, 2022 at 14:28 UTC | |
|
Re: How to replace envs in path?
by Don Coyote (Hermit) on May 09, 2022 at 11:58 UTC | |
by ovedpo15 (Pilgrim) on May 09, 2022 at 12:06 UTC | |
by Don Coyote (Hermit) on May 09, 2022 at 13:54 UTC |