in reply to Modifying Win2K environment variables

The portable and preferable way to set an environment variable for the current process, and any children spawned thereafter:
$ENV{HDS_TEAM_HOME} = "C:\\BATC_APPS\\Team_Flight";

On Windows, the shell (CMD.EXE or COMMAND.EXE) does not communicate behind the scenes, as Un*x shells often do. To alter environment variables for unrelated processes, you have to poke values into pseudo-registry keys. Check out CPAN for Win32::TieRegistry and the docs should help.

--
[ e d @ h a l l e y . c c ]

Replies are listed 'Best First'.
Re^2: Modifying Win2K environment variables (example)
by tye (Sage) on Aug 14, 2003 at 21:36 UTC

    And for some examples of setting environment variables both permanently (in the registry) and in the parent shell at the same time, check out the (updated) CleanPath. (:

                    - tye