binmode(FH); local $/ = "\cM\cJ"; # CRLF print FH "A line of pseudo-ASCII text$/"; while () { # This might actually work, given that it honors $/ }