Merge branch 'master' of http://repo.or.cz/r/msysgit into devel
[msysgit/historical-msysgit.git] / lib / perl5 / 5.6.1 / flush.pl
blob8aa6d5580c976309c6ac198f451de6c597f2b5a7
2 # This library is no longer being maintained, and is included for backward
3 # compatibility with Perl 4 programs which may require it.
5 # In particular, this should not be used as an example of modern Perl
6 # programming techniques.
8 # Suggested alternative: IO::Handle
10 ;# Usage: &flush(FILEHANDLE)
11 ;# flushes the named filehandle
13 ;# Usage: &printflush(FILEHANDLE, "prompt: ")
14 ;# prints arguments and flushes filehandle
16 sub flush {
17 local($old) = select(shift);
18 $| = 1;
19 print "";
20 $| = 0;
21 select($old);
24 sub printflush {
25 local($old) = select(shift);
26 $| = 1;
27 print @_;
28 $| = 0;
29 select($old);