"GSP" <palmergs_no_spam / earthlink.net> wrote in message news:<JFm37.1510$q17.186265 / newsread2.prod.itd.earthlink.net>...
> What you're running into, I think, is the fact that newlines in ms-dos are
> actually two characters (ascii 10 and 13, I think).  When you're reading
> your file, the file system read's 10 and 13 and gives you one byte "\n".

You're both exactly right. It's been years since I've messed with low-level 
DOS files and I'm out of practice.

As a practical matter, an explicit file.binmode isn't necessary if you're 
more careful than I was. You can just append a 'b' to the access mode when 
you open the file for reading or writing. I.e., f = File.new(ARGV[0], "rb")

Thanks,
Tyler