On 3/13/06, Tommy Grav <[EMAIL PROTECTED]> wrote: > I am writing some output to a file using printf. However this output > is buffered. > How do I get unbuffered output to a file. > > Cheers > Tommy > > > [EMAIL PROTECTED] > http://homepage.mac.com/tgrav/ > > "Any intelligent fool can make things bigger, > more complex, and more violent. It takes a > touch of genius -- and a lot of courage -- > to move in the opposite direction" > -- Albert Einstein
Depends. If you are using IO::File or the "open my $fh, '>', $file" style of opening a file handle you can say $fh->autoflush(1); If you are still using the "open FH, '>', $file" style you will need to say select FH; $| = 1; select STDOUT; -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>