note
cdarke
It is not possible for a child process to directly alter the parent's environment block without using some shared memory magic - and that is true whatever the language used, compiled or not.<br><br>The environment block is set at process creation time and by default is a copy of the parent's. There is no concept of a "global" environment. All this is true on Windows and UNIX.<br><br><i>However</i> on Windows, environment variables are also stored in the Registry, either in HKEY_CURRENT_USER\Environment (user variables) or HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment (system variables). So you could use one of the (several) Win32 Perl modules to change the registry. <br><br> Now the tricky bit: for the parent to pick-up the change you should send a WM_SETTINGCHANGE message. I don't know how to do that from Perl, but there probably is a way. Look at the Win32:: namespace modules.<br><br>There are easier ways to pass a text string between programs ;-)
658253
658253