Perl:Read a Text File
Read Text File
You can open a text file and read each line.
Note that the end of line character is included. The chomp method removes this character (on windows this is two characters).
The text file [../haggis.txt haggis.txt] includes some lines of text.