On Tue, 11 Jun 2002, Tom Brown wrote: > > Right, and does Perl write with buffering when you call print()? Yes, it > > does! > > huh? That's what $| is all about, and $|++ is a pretty common line of > code.
A pretty common line of code that wasn't in the example shown! And that only unbuffers the currently selected filehandle. His example showed a print to a named filehandle, so a simple $|++ isn't even enough. Your advice to skip the flock() without explaining any extra steps has a pretty decent chance of resulting in a corrupt logfile given enough time. > man(2) open. see the O_APPEND option... the only footnote is that it > doesn't work properly via NFS... Interesting stuff. But are you sure it works with Perl? Does it work with PerlIO, which is the new default IO scheme in 5.8.0? > p.s. I'm not the only one who considers it impolite to have off-list > messages taken back onto the list... I generally don't post AFAIK comments > to lists, prefering to keep the signal to noise ratio higher. My apologies. I assumed you omitted the mod_perl address from the CC: by accident. I actually think this discussion is still mostly signal. I would like to make sure your advice is either correct for the situation given or taken back publicly to avoid potential harm. Either outcome would be fine with me, actually. -sam