将整个文件作为字符串读取

perl -0777 -ne'print "The whole file as a string: --->$_<---\n"'

注意:-0777 只是一个惯例。任何 -0400 及以上版本都是相同的。