more useful options | |
PerlMonks |
Re: can you autoflush a program in unix?by ikegami (Patriarch) |
on Oct 20, 2009 at 18:47 UTC ( [id://802287]=note: print w/replies, xml ) | Need Help?? |
Yes and no. The buffering in question is done entirely in the program. Unless the program gives you a means of controlling its flushing mechanism, you're out of luck. However, most applications will automatically flush STDOUT (after each newline) when it's connected to a tty. You can fool such applications by using a pseudo tty. IPC::Run makes it easy to use a pseudo tty. See IO::Pty
In Section
Seekers of Perl Wisdom
|
|