From: "Phil H." Date: 2010-11-28T09:50:27+09:00 Subject: Re: Dynamically creating webpages via Ruby > > Sometimes, reformulating the problem helps, too. If you could provide > abbreviate examples of what you want to achieve, we can give you more > specific advice, I guess. > > -- > Phillip Gawlowski > > Though the folk I have met, > (Ah, how soon!) they forget > When I've moved on to some other place, > There may be one or two, > When I've played and passed through, > Who'll remember my song or my face. I probably should have just started with an example. After typing out a simplified version of my code, I think I can pretty easily re-arrange my loop(s) to achieve what I need to do. For the sake of giving this thread resolution here's a simplified version of what I am currently doing: =begin code input_urls = [www.url1.com, www.url2.com, www.url3.com] index_file = File.new('index.html', 'w+') index_file.puts %&Page title& input_urls.length.times do |x| source << input_urls.pop #source is actually an array in my real code, my input array actually has more than just urls in it but i'm trying to keep this simpler extract_urls = Url_finder.new("#{source}") extracted_urls = extract_urls.method_to_parse_for_certain_urls index_file.puts %& search_file = File.new("search#{x}.html", "w+") search_file.puts %&searchpagecenter>& extracted_urls.length.times do |i| content = Content_finder.new("#{extracted_urls[i]}) pics = content.method_to_find_pic_links #pics is an array of urls pics.length.times do |y| search_file.puts %&