in reply to Re^2: Distinguishing text from binary datain thread Distinguishing text from binary data
perldoc -f -X says it reads the current buffer for FHs, and the first block for files.