in reply to Re^4: Newline vs Return
in thread Newline vs Return
perl -e "open(FH, q{>/dev/tty}); print FH (qq{a\n}); sleep(5); print F +H (qq{a\n});"
In older versions of Perl you could get line buffering with IO::Handle's setvbuf method, but it looks like that's no longer supported.
See the stdio function isatty and perl's -t test for more information about how a TTY is detected.
|
|---|