in reply to Re^2: Distinguishing text from binary data
in thread Distinguishing text from binary data
Those tests work on filehandles too, so if you have a socket, that should work.
perldoc -f -X says it reads the current buffer for FHs, and the first block for files.
-nuffin
zz zZ Z Z #!perl
zz zZ Z Z #!perl
In Section
Seekers of Perl Wisdom