Lemme guess...
You expected it to give you the next record when you hit return. But <STDIN> was expecting "\n.\n". So you got one record, hit return, and wondered why you didn't get anything more. :-)
There are other bugs that I can see potentially being an issue as well. But this is the most obvious one.