in reply to reading 100 line at a one time
If you want to save on input time, the proper way to do it is read x number of bytes and then read to the end of the current line and split on line break. Though to be honest, with a 10000 line file I'd probably just read the entire thing into memory, since it's not likely to take up more than maybe 10 MB of space.