On May 15, 12:05 pm, heylow <vnr1...@gmail.com> wrote:
> export ORACLE_HOME=/home/oracle/product/10.2.0/db
> export SID=EDP
This is a shell environment configuration file. Perl doesn't grok
such a file. There are several possibilities to configure your
environment in Perl, including these:
You could source the file and then run the Perl program (all from a
bash script); the Perl program will inherit the shell's environment.
It's kinda ugly, but I do this with cron jobs - the cron invokes a
ksh, which sources the env and runs the Perl program.
Or you can import the settings using a module such as
Shell::EnvImporter (I've never tried this, but it looks like it ought
to do the trick):
http://search.cpan.org/~dfaraldo/She...EnvImporter.pm
Or you can configure the environment directly in the Perl program:
$ENV{'ORACLE_HOME'} = '/home/oracle/product/10.2.0/db';
$ENV{SID} = 'EDP';
--
The best way to get a good answer is to ask a good question.
David Filmer (
http://DavidFilmer.com)