From: Sean Warburton Date: 2010-01-27T11:41:55+09:00 Subject: Re: Build an array using data from an exisiting array burke wrote: > 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. Hello Burke, thanks for the reply, I used the word file but I don't actually build a file, sorry. What i should have said is that I want to build an array of five XML requests , populating each request with the data from an existing array of five items that will be passed as an argument. Does that sound clearer and make more sense? Thanks for your help. -- Posted via http://www.ruby-forum.com/.