Commit | Line | Data |
---|---|---|
a6d71656 GS |
1 | # |
2 | # This library is no longer being maintained, and is included for backward | |
3 | # compatibility with Perl 4 programs which may require it. | |
b2f4098f S |
4 | # This legacy library is deprecated and will be removed in a future |
5 | # release of perl. | |
a6d71656 GS |
6 | # |
7 | # In particular, this should not be used as an example of modern Perl | |
8 | # programming techniques. | |
9 | # | |
10 | # Suggested alternative: IO::Handle | |
b2f4098f | 11 | |
154e51a4 LW |
12 | ;# Usage: &flush(FILEHANDLE) |
13 | ;# flushes the named filehandle | |
14 | ||
15 | ;# Usage: &printflush(FILEHANDLE, "prompt: ") | |
16 | ;# prints arguments and flushes filehandle | |
17 | ||
18 | sub flush { | |
19 | local($old) = select(shift); | |
20 | $| = 1; | |
21 | print ""; | |
22 | $| = 0; | |
23 | select($old); | |
24 | } | |
25 | ||
26 | sub printflush { | |
27 | local($old) = select(shift); | |
28 | $| = 1; | |
29 | print @_; | |
30 | $| = 0; | |
31 | select($old); | |
32 | } | |
33 | ||
c623bd54 | 34 | 1; |