in reply to Re: print output from system command in real time
in thread print output from system command in real time
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.until($cnt == "100"){ print "COUNT IS $cnt\n"; sleep 5; $cnt++; }
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 | |
by boat73 (Scribe) on May 11, 2005 at 12:08 UTC |