http://www.perlmonks.org?node_id=767910


in reply to How to disable buffering ?

Sure, setting $| to true disables buffering for the current filehandle until it is set back to false. You don't have to re-set it for every line of output.