I certainly wouldn't recommend the first solution as, although it looks nice, it will read the entire contents of the file(s) into memory before spitting out the first 5 lines. Better to not even read the 6th line (as demonstrated in other items in this thread), much less allocate memory for it. (: