sub flush { my $osh = select($_[0]); my $oaf = $|; $| = 1; $| = $oaf; select($osh); return 1; }