in reply to using .profile in perl
These get run in a separate process which runs and exits and does not affect your currently running process.
But it seems silly to use bash to set environment variables from a perl script, when you can do $ENV{FOO} = 'bar'.
You can just open the file, read it in line by line and assign the values to keys of %ENV.
Also, why are you using environment variables? I could understand it maybe if you were possibly calling a non-perl program from your script, but if this is all in perl, why not load your config variables using YAML or YAML::Syck?
and in ./home/app/profile:use YAML(); our %Config = YAML::LoadFile('./home/app/profile');
Clint--- foo: bar arrayref: - 1 - 2 - 3 hashref: foo: bar baz: bar
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: using .profile in perl
by Anonymous Monk on Feb 20, 2006 at 02:29 UTC | |
by GrandFather (Saint) on Feb 20, 2006 at 02:44 UTC |