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/';
Use this one-liner to check your environment variables:
perl -Mstrict -we 'foreach my $key (sort keys %ENV) { print "$key => $ENV{$key}\n" }'
-- Flemming Greve Skovengaard The prophecy of the holy Norns a.k.a Greven, TuxPower the world is doomed to die <[EMAIL PROTECTED]> fire in the sky 4112.38 BogoMIPS the end is coming soon
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>