You could setup another environment script to wrap your perl in (although setting up your environment with %ENV should work too). We do similar things by creating little shell scripts that setup the environment, then execute our perl stuff. We have one global env. that we source before all of our crons, etc.
Works great and keeps all of our env. vars in one central place. Matt --- Craig Inman <[EMAIL PROTECTED]> wrote: > I have this program that will work for me as I have my environment variables set > properly in my .profile. Problem is, this needs to be run by lots of people and > I'm trying to avoid having all these people have to change their .profiles to add > the Oracle environment variables. Let's just say, some of these people are at > level -1 on an AIX box and I don't have root access to make the changes myself. > > Here is the part of the program that keeps erroring and below that is the error > message I am getting. > > $ENV{'ORACLE_HOME'} = "/u/spool/oracle/product/8.1.7"; > my $sid = $ENV{'ORACLE_SID'}; > my($user,$passwd,$host) = split(/\/\@/, $ENV{'ORACLE_USERID'}); > $user = 'readonly'; > $passwd = 'readonlytest';> my $dbh = DBI->connect("dbi:Oracle:$sid", $user, $passwd); > if (!defined($dbh)) > > { > warn "Could not make the connection! $! \n"; > exit 1; > } > > ERROR MSG > > DBI->connect() failed: ORA-07217: sltln: environment variable cannot be evaluated. > (DBD ERROR: OCISessionBegin) at > /u/home/cinman/bin/allhistory line 85 > Could not make the connection! > > I have checked some of the unix/oracle boards, but the only answer I have gotten > is to set the variables in the user's .profile. Thought I would check with some of > you perl mongers and see if you had run across this and had any other suggestions. > > Thanks, > Craig > > __________________________________________________ Do You Yahoo!? Yahoo! Health - your guide to health and wellness http://health.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]