Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I'm using Win32::Process:Create to spawn processes on Windows. I cannot use system or backticks or open because I need to have a timeout on the process (kill it if it hangs). The problem I have is that %ENV is not passed to the child process. Is there a workaround or something I'm missing?

Thanks for any piece of wisdom,

The code looks like this

[...] $ENV{'VARIABLE'} = "whatever string"; Win32::Process::Create($ProcessObj, $self->{COMMAND}, $self->{ARGS}, 0, 'NORMAL_PRIORITY_CLASS', $self->{CWD}); [...]