mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-25 10:03:03 +01:00
166a9877e4
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
32 lines
642 B
Perl
32 lines
642 B
Perl
#
|
|
# This library is no longer being maintained, and is included for backward
|
|
# compatibility with Perl 4 programs which may require it.
|
|
#
|
|
# In particular, this should not be used as an example of modern Perl
|
|
# programming techniques.
|
|
#
|
|
# Suggested alternative: IO::Handle
|
|
#
|
|
;# 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;
|