That's not going to help. $| only works on the currently selected filehandle which in his case is the default of STDOUT and he's not printing anything to STDOUT so $| = 1 won't do any good by itself. select(OUT); $| = 1; select(STDOUT); would autoflush OUT.