system or pause is clearing the input queue, so you're sending the newline too soon.
For testing, I put sleep(2) before the print WW "\n";, and it worked fine.
Finding when to send the newline accurately will be tricky given what I said in my earlier response.
In reply to Re: Perl Open2/3 and .exe
by ikegami
in thread Perl Open2/3 and .exe
by markusk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |