It is important believe me. Especialy if you are writting to logfiles, databases and unix named pipes.
If in this context buffered io is on it will happen that if you prints something to a file or anywhere not the whole line is dumped only the stuff what was in the buffer when the buffer was flushed because of its size the last time. if you give out the line: Hello, I am here./n Buffered it could look like this at the destination: Hello, I a Unbuffered it will look like this: Hello, I am here./n Beware THERE IS A DIFFERENCE OF PRINTING TO A FILE, PIPE, PROGRAM and a TTY / COMMANDLINE. See Fcntl, File::Handle, Io::Handle at cpan for more. -----Ursprungliche Nachricht----- Von: Eternius [mailto:[EMAIL PROTECTED] Gesendet: Mittwoch, 4. Februar 2004 12:00 An: [EMAIL PROTECTED] Betreff: Re: FW: special vars Nilay Puri wrote: > >> -----Original Message----- >>From: Nilay Puri, Noida >>Sent: Wednesday, February 04, 2004 11:37 AM >>To: Perl (E-mail) >>Subject: FW: special vars >> >> >> >> -----Original Message----- >>From: Nilay Puri, Noida >>Sent: Wednesday, February 04, 2004 11:32 AM >>To: Perl (E-mail) >>Subject: special vars >> >>Hi all, >> >>Can any one help me understand the usage of special variable $| ? >> >>I know the description of this var. If set to nonzero, forces a flush >>after every write or print. >> >>But I am not able to understand its importance. >> >>If I am reading a file and writing the contents in a separat file after >>some processing. >>What will happen if I set $|=1 ? >> >>Thanks, >>NP >> >> >> >> if u use an OS like linux (which will not write things imediately to disc) this forces it to do so. -- 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>