perldoc PerlIO [ SNIP ] :raw The ":raw" layer is defined as being identical to calling "binmode($fh)" - the stream is made suitable for passing binary data i.e. each byte is passed as-is. The stream will still be buffered.