mirror of https://github.com/tongzx/nt5src
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
368 B
23 lines
368 B
;# 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;
|