From: sto.mar@... Date: 2013-01-12T22:53:09+09:00 Subject: Re: How to take information from a text file and add them to an array Am 12.01.2013 14:26, schrieb Joel Pearson: > Exactly what you do depends on how your input is formatted, but say you > had one name per line: > > my_array = File.open("example.txt", "r").read.split("\n") > my_array.delete '' > p my_array > or: names = File.read('names.txt').split(/\n/) --