If you open a file the usual way, you can flush the output buffer with .flush(). How do you flush the output buffer of a print command, either 'print string' or 'print >>ofile, string' ?