Ruby:Read a Text File
Note that the end of line character is included. The chomp method removes this character (on windows this is two characters).
The text file http://progzoo.net/haggis.txt includes some lines of text.
In this example all lines are read into array a. We print out line number 2 (the third line).