Extremely inefficient, you should keep track of the size in another variable and only count the length of `$line`.