The stupid question is the question not asked | |
PerlMonks |
Re: Is print faster than syswrite?by ikegami (Patriarch) |
on Jan 27, 2009 at 13:54 UTC ( [id://739194]=note: print w/replies, xml ) | Need Help?? |
$| = 1; only affects STDOUT, not FILE. That accounts for the speed difference and the clobbering.
Add FILE->autoflush(1); after the open statement. (Don't forget to use use IO::Handle;) to bring print inline with syswrite.
In Section
Seekers of Perl Wisdom
|
|