Thanks for all your replies
Makes sense now that i've seen what is happening behind the scenes.
I come from a Java background but didn't think to test if it was adding 
carriage returns to the end of the string.

-- 
Posted via http://www.ruby-forum.com/.