tariqahsan has asked for the wisdom of the Perl Monks concerning the following question:
I am trying to assign a variable with a value read from a config file. Also, it could be a config file that could be sourced to set the ENV and getting the value from it within the script. I tried to use AppConfig and Config::IniFiles but without any useful success. I also tried the following like snippet:
%ENV = map {\^([^=]+)=(.*)$/} split /\n/, `. ./env.conf;env`; $param = $ENV{'PARAM'}; print " PARAM = $param\n";
Haven't had any useful success. Anybody could help?
edited by footpad, ~Fri Nov 30 21:09:39 2001.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(jeffa) Re: How to assign a variable with a value read from a config file
by jeffa (Bishop) on Dec 01, 2001 at 02:17 UTC | |
|
Re: How to assign a variable with a value read from a config file
by dragonchild (Archbishop) on Dec 01, 2001 at 02:17 UTC | |
|
Re: How to assign a variable with a value read from a config file
by perrin (Chancellor) on Dec 01, 2001 at 04:21 UTC | |
|
Re: How to assign a variable with a value read from a config file
by WildThing (Initiate) on Dec 01, 2001 at 14:09 UTC |