This code will create a text file called 'test.txt' with the content 'I'm alive' both with perl.exe and wperl.exe:
use IPC::Open2;
#$pid = open2( \*Reader, \*Writer, "notepad.exe" );
open OUTF, ">test.txt";
print OUTF "I'm alive";
close OUTF;
Now, the following code will do the same (+open a window for notepad.exe) with perl.exe but will FAIL with wperl.exe (the notepad window is opened but NO text file is created). The only difference is that now the Open2 call is not commented out:
use IPC::Open2;
$pid = open2( \*Reader, \*Writer, "notepad.exe" );
open OUTF, ">test.txt";
print OUTF "I'm alive";
close OUTF;
To me this is proof that with wperl.exe the execution is aborted at the Open2 call. |