Hi, <div><br></div><div>I bumped into this strange problem that Perl cannot get the output from .Net apps. </div><div><br></div><div>First of all, this is my simple .Net app written in C#:</div><div><br></div><div><div>--------------------------------------------------</div>
<div>using System;</div><div><br></div><div>namespace ConsoleApp</div><div>{</div><div> class Program</div><div> {</div><div> static void Main(string[] args)</div><div> {</div><div> Console.WriteLine(DateTime.Today);</div>
<div> }</div><div> }</div><div>}</div></div><div><div>--------------------------------------------------</div><br class="Apple-interchange-newline"></div><div><div>It works fine:</div><div><br></div><div>ConsoleApp$ bin/Debug/ConsoleApp</div>
<div>3/16/2012 12:00:00 AM</div></div><div><br></div><div>Perl can grab normal program outputs just fine:</div><div><br></div><div><div>$ seq 5 | perl -pe 's/^3$/`date`/e;'</div><div>1</div><div>2</div><div>Fri Mar 16 10:55:46 EDT 2012</div>
<div><br></div><div>4</div><div>5</div></div><div><br></div><div>Now it is time to put Perl & .Net app together:</div><div><br></div><div><div>$ seq 5 | perl -pe 's|^3$|`bin/Debug/ConsoleApp`|e;'</div><div>1</div>
<div>2</div><div><br></div><div>4</div><div>5</div></div><div><br></div><div>Boom, it suddenly stops working. </div><div><br></div><div>Have you experience something similar before?</div><div>What's the solution?</div>
<div><br></div><div><br></div><div>PS. My test run environment is cgwin. <br></div><div><br></div><div>Thanks <br></div><div><br></div><div><br></div>