windows-nt/Source/XPSP1/NT/tools/x86/perl/lib/flush.pl

24 lines
368 B
Perl
Raw Normal View History

2020-09-26 03:20:57 -05:00
;# Usage: &flush(FILEHANDLE)
;# flushes the named filehandle
;# Usage: &printflush(FILEHANDLE, "prompt: ")
;# prints arguments and flushes filehandle
sub flush {
local($old) = select(shift);
$| = 1;
print "";
$| = 0;
select($old);
}
sub printflush {
local($old) = select(shift);
$| = 1;
print @_;
$| = 0;
select($old);
}
1;