[Israel.pm] print to 2 places at the same time

Oron Peled oron at actcom.co.il
Wed Jun 2 02:01:33 PDT 2004

On Wednesday 02 June 2004 11:43, Offer Kaye wrote:
> concurrent? How? First I print to both STDOUT and OUT, later I print to
> STDOUT alone, finally I print to both STDOUT and OUT. Nothing concurrent
> here...

The 'tee' is running concurrent with your script and may write before/after
your process (depends on OS scheduling).

In an answer to Srikanth about the role of $| and OS it should be noted
that all this variable does is cancel the buffering of the stdio library
(which is handled in the application). It offers a subset of the options
in setvbuf(3) standard C library function and so has no effect on the
OS kernel.

Oron Peled                             Voice/Fax: +972-4-8228492
oron at actcom.co.il                  http://www.actcom.co.il/~oron

"We've heard that a million monkeys at a million keyboards could produce
the Complete Works of Shakespeare; now, thanks to the Internet, we know
this is not true."           --Robert Wilensky, University of California

More information about the Perl mailing list