Randy Kramer wrote:
> I've done some googling, some looking in the pickaxe(2) book (using the 
> index), and some experimenting in irb, but I can't readily see the difference 
> between puts and write (except that write doesn't work in all cases in irb:)
> 
> irb(main):044:0> write "\nmorF\n\n"
> NoMethodError: undefined method `write' for main:Object
> 
> So what is the difference (specifically for the case of writing to a file) 
> and/or when should I use one vs. the other?
> 
On a File object (actually, they're defined on IO), write just writes 
the string given to the file unchanged.  IO#puts adds a newline at the 
end of the string if there isn't one already.

-- 
Alex