根据man perlrun
:
-0[octal/hexadecimal]
specifies the input record separator ($/) as an octal or
hexadecimal number. If there are no digits, the null character is
the separator.
Run Code Online (Sandbox Code Playgroud)
和
The special value 00 will cause Perl to slurp files in paragraph
mode. Any value 0400 or above will cause Perl to slurp files
whole, but by convention the value 0777 is the one normally used
for this purpose.
Run Code Online (Sandbox Code Playgroud)
但是,鉴于此输入文件:
This is paragraph one
This is paragraph two.
Run Code Online (Sandbox Code Playgroud)
我得到了一些意想不到的结果:
$ perl …
Run Code Online (Sandbox Code Playgroud) perl ×1