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