- 论坛徽章:
- 0
|
原帖由 Basin 于 2006-3-7 08:44 发表
[code]#!c:\perl\bin\perl.exe
use IO::Socket;
...
$sock->flush();
}
close($sock)
这是高级perl编程中的一段代码,最后的$sock->flush()是什么意思?函数flush()是模块Socket或者INET的函数吗?有什么作用?谢谢解答
Hallo,
here $sock->flush() is obj. $sock to call method flush() from the top package IO::Handle.
see perldoc IO::Handle:
$io->flush
"flush" causes perl to flush any buffered data at the perlio api level.
Any unread data in the buffer will be discarded, and any unwritten data will be written
to the underlying file descriptor. Returns "0 but true" on success, "undef" on error.
regards, ulmer
[ 本帖最后由 ulmer 于 2006-9-26 18:28 编辑 ] |
|