Handle input of varying line length.