in reply to Setting environment variables by reading them from a configuration file

I don't know if this will work, but this technique is what we use with Perl DBI and DBD::Oracle so that the proper Oracle environment variables are set:
#!/usr/bin/perl -w BEGIN { $ENV{'ORACLE_HOME'} = "/path/to/oracle"; $ENV{'ORACLE_SID'} = "abc"; } # the rest of your code goes here
The message being that statements in the BEGIN block are done before any other statements in your script. Try setting your environment variables in there, and then see if you can see those settings inside your script.

HTH.

  • Comment on Re: Setting environment variables by reading them from a configuration file
  • Download Code