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 <input.txt>
--------------------------
car\nplane\ntrain \n boat

second line, first token \n second token
--------------------------

OUTPUT <windows cmd console>
--------------------------
["\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/.