If each line can be processed separately, I would definitely read
line by line. This will make it easier for your program to
handle if the input size grows in the future.
Indeed. Why do you want to read the whole file into
an array? That'll eat up gobs of memory if the file is
large (of course, if the file is very large, you should
probably consider alternatives to flat-file storage).