- 論壇徽章:
- 0
|
特殊的字符問(wèn)題~(二)
我測(cè)試了一下,在win2000 perl 5.8.0 下,無(wú)論文本還是二進(jìn)制都可以讀進(jìn)
所有字符0-255 都試了,只是有回車和回車換行的轉(zhuǎn)換差別,但 Learning Perl 上說(shuō)有的系統(tǒng)是以 ctrl-D表示文件結(jié)束,有的系統(tǒng)是以ctrl-Z表示文件結(jié)束
原文如下:
@a = <STDIN>;; # read standard input in a list context
If the person running the program types three lines, then presses
CTRL-D[4] (to indicate "end of file" , the array ends up with three elements. Each element will be a string that ends in a newline, corresponding to the three newline-terminated lines entered.
[4] Some systems use CTRL-Z to indicate end of file, while others use it to suspend a running process. |
|