On Oct 17, 2007, at 00:05, John Joyce wrote:
> as you iterate each line:
> line.chop!.chop! + "\n"

You don't want to use chop! unless you're trying to modify line.  If  
you really wanted to use chop! you'd use it like:

line.chop!
line.chop!
line =+ "\n"

If you want to chain them, you probably want line.chop.chop + "\n".

In any case, it's safer to use the regexp because you don't know if  
there's extra whitespace, what the end-of-line chars look like, etc.

Ben