ccarden has asked for the wisdom of the Perl Monks concerning the following question:
my %hash; $hash{APP_DIR} = "/usr/vendor/app/version/"; $hash{TMP_DIR} = "/usr/tmp/"; $hash{PROJ_DIR} = "/usr/people/userid/app/"; $hash{APP_LOCATION} = "/usr/vendor/app/version/bin/"; ... use Env qw(keys %hash); foreach $key (keys %hash) { eval("$key=\"$hash{$key}\""); print " $key=$hash{$key}\n"; } system("printenv");
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: setting env vars from hash fails for me
by chromatic (Archbishop) on Aug 06, 2003 at 22:31 UTC | |
|
Re: setting env vars from hash fails for me
by japhy (Canon) on Aug 06, 2003 at 22:32 UTC | |
|
Re: setting env vars from hash fails for me
by Zaxo (Archbishop) on Aug 06, 2003 at 22:34 UTC | |
|
Re: setting env vars from hash fails for me
by dws (Chancellor) on Aug 06, 2003 at 22:38 UTC | |
by chromatic (Archbishop) on Aug 07, 2003 at 00:04 UTC | |
by Limbic~Region (Chancellor) on Aug 06, 2003 at 23:27 UTC | |
|
Re: setting env vars from hash fails for me
by PodMaster (Abbot) on Aug 07, 2003 at 06:06 UTC | |
|
Re: setting env vars from hash fails for me
by LazerRed (Pilgrim) on Aug 06, 2003 at 22:38 UTC | |
|
Re: setting env vars from hash fails for me
by ccarden (Monk) on Aug 07, 2003 at 15:35 UTC |