> So your file has fixed width records?  This is important to know,
> otherwise approach 2 from below becomes tricky (you basically need to
> read line by line in order to find the proper position whereas you
> otherwise can calculate the position via record size).

Yes, the records are all fixed width.  The width of the file is based on 
the extension type.

> Btw, is there a particular reason why you create what looks like a
> relational database based on text files?

I'm working off of a standard format that has been used for years 
(called Mail.dat).  Editing the files has been an extremely time 
consuming process, so I'm trying to write an automated script to batch 
replace specific parameters.  After doing some research, it seemed like 
Ruby was a great language to learn for this type of text manipulation 
and it turned out to be quite fun to boot.

I'm currently working through the book Beginning Ruby: From Novice to 
Professional, but it does not go very in depth on text file manipulation 
techniques.  I tried looking through the classes and methods online, but 
without a strong foundation in the language it's difficult to navigate 
that amount of information.  If you could provide any additional 
information it would be immensely helpful.

Thanks again!
-- 
Posted via http://www.ruby-forum.com/.