in reply to Re: Is print faster than syswrite?
in thread Is print faster than syswrite?

Add FILE->autoflush(1); after the open statement. (Don't forget to use use IO::Handle;) to bring print inline with syswrite.

Thanks. That is really useful information. I thought $| = 1 affects buffering of print function wherever it is used. I will try it out.

Replies are listed 'Best First'.
Re^3: Is print faster than syswrite?
by ikegami (Patriarch) on Jan 28, 2009 at 05:42 UTC
    $|=1; only affects the currently selected file handle, which is STDOUT by default.