title: How do I flush a file in Perl?
body: <p>I have Perl script which appends a new line to the existing file every 3 seconds. Also, there is a C++ application which reads from that file.</p>
  
  <p>The problem is that the application begins to read the file after the script is done and file handle is closed. To avoid this I want to flush after each line append. How can I do that?</p>