open OUT, ">test.txt"; my $fh = select OUT; $| = 1; select $fh; for (1 .. 1000) { print OUT "Hello, Perlmonks!\n" x 10; print -s OUT; }