http://www.perlmonks.org?node_id=1013173


in reply to Re^4: passing env{} variable to child fails on linux,works on windows
in thread passing env{} variable to child fails on linux,works on windows

Here's the quote from perdloc threads

Currently, on all platforms except MSWin32, all system calls (e.g., us +ing system() or back-ticks) made from threads use the environment var +iable settings from the main thread. In other words, changes made to +%ENV in a thread will not be visible in system calls made by that thr +ead. To work around this, set environment variables as part of the system c +all. For example: my $msg = 'hello'; system("FOO=$msg; echo \$FOO"); # Outputs 'hello' to STDOUT On MSWin32, each thread maintains its own set of environment variables +.