sub flush { my $fh = select( STDOUT ); my $hot = $|; $| = 1; print STDOUT ''; $| = $hot; select( $fh ); return; }