while (<$fh>) { # do something with one line of input }