in reply to Re^3: Newline vs Return
in thread Newline vs Return
That's not quite true. Only STDOUT is line-buffered by default. In fact, only STDOUT is ever line-buffered(*). I verified this with the following snippet:
perl -e "open(FH, q{>test}); print FH (qq{a\n}); sleep(5); print FH (q +q{a\n});"
The lines only appeared after the 5 seconds were over.
(*) Maybe XS or PerlIO can change this? Of course, tie could.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Newline vs Return
by sgifford (Prior) on Oct 07, 2005 at 21:27 UTC |