Thanks, that is a very nice solution. I didn't think of the idea of storing lists under each key then processing them afterward, and didn't know about the eof test.
And pretty code too.
Thanks again.
Comment on Re^2: Summing repeated counts for items stored in separate file