in reply to Re: Get the process id, and output of a process, in a threaded environment
in thread Get the process id, and output of a process, in a threaded environment
$ perl -Mthreads -e 'async { local %ENV = %ENV; $ENV{CPU} = "/"; open +my $PIPE, "echo \$CPU |"; print <$PIPE>}->join; $ENV{CPU}="MSWin"; sy +stem "echo \$CPU"' x86_64 MSWin
|
|---|