in reply to How to access system environment variables?

%ENV E.g.:
print "Path = ", $ENV{PATH}, "\n"; $ENV{PATH} .= ";c:\temp"; # add c:\temp to it
You may be interested in the perlvar documentation.

Not sure how it works under Windows, but under Unix these changes are not global and only survive for the life of your script and its children.

Replies are listed 'Best First'.
RE: Re: How to access system environment variables?
by myocom (Deacon) on Oct 06, 2000 at 01:08 UTC

    Yes, that's also true under Windows (I always assumed it was, but then I got to wondering, so I just tested it).