Mark> I did more investigation into my previous problem and what happens Mark> is that my text file has \r for representing a new line instead of Mark> a \n. Trying to process a file generated on a Mac, perhaps? Try opening the file with universal newline mode: f = file("somefile.txt", "rU") Skip