From: Jester Mania Date: 2010-12-04T11:29:41+09:00 Subject: Re: Text Parsing Help Peter/Josh, Thanks once again for the helpful posts. I am learning quite a bit which is good. However, I just tried to replicate Peter's example and when I attempted to use the .inspect method, the output was not what I expected: INPUT FILE -------------------------- car\nplane\ntrain \n boat second line, first token \n second token -------------------------- OUTPUT -------------------------- ["\377\376c\000a\000r\000\\\000n\000p\000l\000a\000n\000e\000\\\000n\000t\000r\0 00a\000i\000n\000 \000\\\000n\000 \000b\000o\000a\000t\000\r\000\n"] ["\000\r\000\n"] ["\000s\000e\000c\000o\000n\000d\000 \000l\000i\000n\000e\000,\000 \000f\000i\00 0r\000s\000t\000 \000t\000o\000k\000e\000n\000 \000\\\000n\000 \000s\000e\000c\0 00o\000n\000d\000 \000t\000o\000k\000e\000n\000"] -------------------------- Do you know why are they so many numbers? like \377 and \000? -- Posted via http://www.ruby-forum.com/.