in reply to Re: print output from system command in real time
in thread print output from system command in real time

Thanks but that did not work. I built a standalone exe from the following code. Oh and I am doing this on windowz to make it even more fun.
until($cnt == "100"){ print "COUNT IS $cnt\n"; sleep 5; $cnt++; }
I then call the exe within perl. With the code you supplied it still waits until completion before printing. I even tried setting autoflush with the code below.
open SYS, "c:\\temp\\junk.exe |" or die "$!"; $oldfh=select(SYS); $| = 1; select($oldfh); $| = 1; while (<SYS>) { print } close SYS;

Replies are listed 'Best First'.
Re^3: print output from system command in real time
by Joost (Canon) on May 10, 2005 at 18:57 UTC
      Hmmm, the problem is that the exe I am truly running does the same thing and I am unable to modify that code. System didn't work, still waits til completion to print.