in reply to Importing environment variables from shell script file to Perl
I'm not sure about "real" sh implementations, but bash acting as /bin/sh requires that you export your environment variables in order for subprocesses to see them.
So your myenv.sh should end with
Then, in myperl-script.pl, you can access those values as $ENV{blah} and $ENV{balh3}. See perldoc perlvar for more information about the %ENV "magical" hash.export blah balh3
I hope this helps!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: enviorment
by bugsbunny (Scribe) on Oct 23, 2003 at 12:25 UTC | |
by iburrell (Chaplain) on Oct 23, 2003 at 19:50 UTC |