Nobuyoshi Nakada
7/30/2007 7:43:00 PM
Hi,
At Tue, 31 Jul 2007 03:50:24 +0900,
Li Chen wrote in [ruby-talk:262503]:
> I write a small script to read old files and write to new files. Either
> reading line by line or whole file at once then I ask Ruby to write to
> new files. The new file is much smaller than the old one. I also find
> that the new file losses many information. How to explain this?
Use "rb" and "wb" mode for binary files, or better, use FileUtils.cp.
--
Nobu Nakada