From: burke Date: 2010-01-27T11:11:34+09:00 Subject: Re: Build an array using data from an exisiting array How about something like: file_names = ["a.xml", "b.xml", "c.xml", "d.xml", "e.xml"] file_contentses = file_names.map{|file| File.read(file)} so now you can do `file_contentses[0]`, for example, to get the contents of a.xml.