ronbarak has asked for the wisdom of the Perl Monks concerning the following question:
I have a Perl script that relies on $ENV{'ORACLE_HOME'}.
However, it may be that the account I run the script under has not set $ORACLE_HOME.
The setting of $ORACLE_HOME in the shell is performed by executing (sourcing) the following in .bashrc of the account: . /etc/profiles/bashrc.ora.v.10 (it contains lines like: "<b>export ORACLE_BASE=/oracle</b> and <b>export ORACLE_HOME=$ORACLE_BASE/v10.2.0</b> depending on the Oracle version).
My question is, how can I source '/etc/profiles/bashrc.ora.v.10' in my Perl script, and have the results inserted in the script's current environment ?
Note: I cannot just write $ENV{ORACLE_HOME}='/oracle/v10.2.0' ;, as the Oracle version is not known to my script.
Thanks,
Ron.
|
---|