projects
/
unix-history
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
BSD 4_4 development
[unix-history]
/
usr
/
contrib
/
lib
/
perl
/
flush.pl
;
# 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
;