----- Original Message ----- From: Thomas Bätzler <[EMAIL PROTECTED]> Date: Monday, January 31, 2005 9:07 am Subject: RE: flush function
> Urs Wagner <[EMAIL PROTECTED]> asked: > > I have a problem on WinXP. In perl I want to read the tail of a > file. > > The file is written with another windows program. If I am > > using a sleep(5) before of the read command I get the new > > tail content. It seems the program has longer to write it or > > it is buffered. > > Is there a command in perl to flush a file? > > Yes and no. > > You can set autoflush on the filehandle in question, > but that will only work for your own write operations. > You can't force another process to flush pits pending > output by doing this, though. Actualy, it can be done. You would need to work out the IO in your process and then spawn off a child [ another process ]. Can be complicated depands on what you are really after. Mark G. > > HTH, > Thomas > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > <http://learn.perl.org/> <http://learn.perl.org/first-response> > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>