BEGIN { use Env; # Ok. This is a test. Lets see if I can import # (source) a shell environment list. my $CRONENV = "/u20/home/gvc/bin/run_cronenv"; open(SOURCE,$CRONENV) or die("Cannot read $CRONENV\n"); while ( ) { chomp(); $_ =~ s/export //; if ( !/^#/ and /\W/ ) { (my $key, my $value) = split(/=/) if $_; $ENV{$key} = $value; Env::import($key); } } close(SOURCE); # Gotta set some environmental stuff really fast. ## NOTE: this was the stuff I had in here before ## the mimication (tm) of the shell env file above. $ENV{'ORACLE_HOME'} = "/u40/app/oracle/product/8.1.6"; $ENV{'ORACLE_SID'} = "CORPDB"; $ENV{'ORAENV_ASK'} = "NO"; $ENV{'LD_LIBRARY_PATH'} .= $ENV{'ORACLE_HOME'} . "/lib"; # while ( (my $key,my $value) = each %ENV ) { # print "$key=$value\n"; # } } # End BEGIN clause #### # # global environment file # export PATH=/path0:/path1:/path2 export ORAENV_ASK=NO export YADA=YADAYADA export ANOTHER_VAR=something export dt=`date +%y%m%d` # comment here export LAST=blah