crusty_collins has asked for the wisdom of the Perl Monks concerning the following question:
AHHHH The $ENV will work just great! Thanks a lot!my @array = qw(daemon=7500 port=tcp resil=60); foreach my $variable (@array) { print "$variable\n"; # do something to set the variable ($var, $value) = split/=/,$variable; now what? }
works like a champ!for $var (keys %$VARS) { $ENV{$var} = $$VARS{$var}; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: setting envirnment variables from array.
by brian_d_foy (Abbot) on May 20, 2005 at 17:11 UTC | |
|
Re: setting envirnment variables from array.
by mrborisguy (Hermit) on May 20, 2005 at 17:12 UTC | |
|
Re: setting envirnment variables from array.
by revdiablo (Prior) on May 20, 2005 at 17:13 UTC | |
|
Re: setting envirnment variables from array.
by Fletch (Bishop) on May 20, 2005 at 17:13 UTC | |
|
Re: setting envirnment variables from array.
by crusty_collins (Friar) on May 20, 2005 at 18:01 UTC | |
by djohnston (Monk) on May 20, 2005 at 19:23 UTC |