The file is needlessly loaded into memory all at once. Nothing to worry about with the files the author quoted, but why do it if a while() will do just as well?
If there is some kind of format violation like a blank line or one that doesn't start with a number, the variant using split will always spit out a warning while yours will silently use zero (which may be what the condition is checking for).