You can access all the env variables like this...

$ENV{ 'VAR' }

example
my $home = $ENV{ 'HOME' };
print "$home\n";

I have never tried to change them but I would assume
that it would work.

HTH,
Paul Kraus

On Tue, Jul 27, 2004 at 07:29:45AM -0700, jason corbett wrote:
> How does one go about assuring that the environment variables are properly set in 
> perl? I read several books, but none go in depth about how to write a script that 
> includes all the required variables, that way nothing gets left out. 
>  
> Please advise.
>  
> JC
>  
> [snipet]
>  
>  
> #!/usr/bin/perl -w
> 
> $ENV{"ORACLE_HOME"}="/orav101/oracle/8.1.7";
> 
> use strict; 
> use DBI;
> use lib '/home/samcsm/jason/myperl/lib/perl5/site_perl/';
> 
>  
> 

Attachment: pgp1DvCvYBmPM.pgp
Description: PGP signature

Reply via email to