From: Joel Pearson Date: 2013-01-13T04:08:58+09:00 Subject: Re: How to take information from a text file and add them to an array Just to take this a bit further and give you a practical demonstration, although you might want to look into encrypting the passwords as well for safer storage... Assuming the input is an already-validated tab-delimited file with "username\tpassword" as the format: users_passwords = Hash.new temparray = File.read('input.txt').split(/\n/).map! { |line| line.split("\t") } temparray.each { |ar| users_passwords[ar[0]] = ar[1] } p users_passwords -- Posted via http://www.ruby-forum.com/.