From: RLMuller@... (Richard) Date: 2003-06-05T22:58:32+09:00 Subject: Re: ios.gets doesn't seem to work as advertised Hi All, I solved one part of my problem, i.e. how to loop through individual lines in a given text file, by using IO.foreach, e.g.: IO.foreach(fullFileName) { |rec| processRec(rec) } That routine recognized the \r\n delimiter implicitly. However, it surprised me by returning an empty record after the final char(s), i.e. the delimiter. That wasn't mentioned in The Pragmatic Programmer's Guide. Am I misinterpreting anything here? For the second part, how to continually monitor a file to get the next unread record or an "EOF" return code allowing the thread to wait and again test for the availability of an unread record (appended by some other thread), I think I need to access a Win32 routine. I'm going to check that out now. If anyone has a suggestion about this approach, I'd appreciate hearing about it. Regards, Richard