Another thing you might want to try is making a small module to house your
variables.  You should be able to do something like this:

###############
#ora.pm -- houses global variables for Oracle scripts
package Steve::ora;

$server = 'buddha';
$DB = 'mohammed';

1
#don't forget that the last line of the module has to be a 1;

###############

Then you can name your file ora.pm and put it in the site/lib/steve
directory and use it like this:

use Steve::ora;

my $server = $Steve::ora::server;
my $DB = $Steve::ora::DB;

-----Original Message-----
From: Steve Main [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 04, 2002 8:03 AM
To: Kipp, James; Steve Main; [EMAIL PROTECTED]
Subject: RE: Environment setup



Thanks for the quick reply James,

How would I set this up in a script and have all the other scripts
be able to use it?

-----Original Message-----
From: Kipp, James [mailto:[EMAIL PROTECTED]]
Sent: Friday, October 04, 2002 7:33 AM
To: 'Steve Main'; [EMAIL PROTECTED]
Subject: RE: Environment setup


you can use the %ENV hash
example:
$ENV{ORACLE_HOME} = "/opt/oracle/product/9.0.1";

> -----Original Message-----
> From: Steve Main [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 04, 2002 10:23 AM
> To: [EMAIL PROTECTED]
> Subject: Environment setup
> 
> 
> Hello list,
> 
> I have an Oracle framework written in Korn shell scripts that I am
> attempting to re-write in Perl.  I am having trouble figuring out
> how to "source" in environment variables.  For the shell 
> scripts, I have
> a script that sets all of the global variables and then each script in
> the framework "sources" that script so that all the scripts
> start with the same environment.  The gist of what I need is to
> keep the global variables (like the log directory) in one place
> and not in each script.  Can anyone tell me how this can
> be accomplished in Perl?
> 
> thanks for you time
> 
> Steve
> 
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to