From: Gene Vincent Date: 2009-04-02T05:55:07+09:00 Subject: Re: BInary Files Michael Malone wrote: > Gene Vincent wrote: >> Hi I'm pretty new to Ruby and writing code in general. That being said >> Im trying to learn how to create and modify(by a percentage) a binary >> file. Any advise or pointers would be apprieciated. >> > My personal view, is that binary files should be avoided unless > absolutely necessary. Being able to look through the contents of a file > and eyeball what's wrong is incredibly useful. That being said, if you > absolutely need to write binary, take a look at the documentation for > the Array#pack method. That should give you a nice starting point. > > Michael > > ======================================================================= > This email, including any attachments, is only for the intended > addressee. It is subject to copyright, is confidential and may be > the subject of legal or other privilege, none of which is waived or > lost by reason of this transmission. > If the receiver is not the intended addressee, please accept our > apologies, notify us by return, delete all copies and perform no > other act on the email. > Unfortunately, we cannot warrant that the email has not been > altered or corrupted during transmission. > ======================================================================= sadly yes I do have to use some binary files for the test im trying to run, but thank you very much for the info. Gene -- Posted via http://www.ruby-forum.com/.