Software >> Development >> Languages >> Perl >> How to read one line at a time from a text file

1. while (<FILEHANDLE>) { # put commands to process the line here } 2. no actual read command needed, a newline will be read into $_ till eof encountered. 3. If need to remove the "\n" character at the end, use chop. Last updated on (yyyy-mm-dd): 2008-01-16