in reply to How to flush output to the console?

To further the question, I've got a script that will do a "use This::Module" for every module I have in an application. There are some 1400+ modules, so I want to have a print statement every 100 modules to see where the compilation is at. I tried doing $|=1;, but that didn't flush - I still get all 14 print statements at the very end. The line I'm using to print is print "Compiling File ##\n";. Any thoughts?

Originally posted as a Categorized Answer.