Read lines into an array : IO.readlines « File Directory « Ruby






Read lines into an array


words = IO.readlines("/usr/share/dict/words")

 

Related examples in the same category

1.Get the longest line