in reply to Re^2: parsing the results of the subroutine in real time
in thread parsing the results of the subroutine in real time
The first set of Perl code here, for example, autoflushes the output buffer after every print, does a substitution, prints, sleeps for a second, then starts with the next line. The second instance of perl just prints everything it gets from STDIN as soon as it gets it.
perl -ne '$|++; s/print/say/; print $_; sleep 1;' ffi/test.input | per +l -pe ''
On Linux you actually have some OS-supported options like Unix sockets, named pipes, and such. You can open a file for writing by one process and for reading by another, and the data goes from the one to the other.
Perl fully handles reading and writing lines of output in other than batch-style modes, though, as it's a general purpose programming language.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: parsing the results of the subroutine in real time
by doar4forum (Initiate) on Apr 04, 2008 at 22:43 UTC | |
by BrowserUk (Patriarch) on Apr 04, 2008 at 23:35 UTC | |
by mr_mischief (Monsignor) on Apr 04, 2008 at 23:05 UTC |