From: Robert Klemme Date: 2010-10-29T18:50:02+09:00 Subject: Re: mechanize - extract href On Fri, Oct 29, 2010 at 9:15 AM, Corey Watts wrote: > Robert, thank you so much for your help.  I'm just starting out in ruby, > so I have a lot to learn!  I've attached my code with the changes you > recommended. > > Attachments: > http://www.ruby-forum.com/attachment/5263/mech.rb Few remarks: for x in 1...2 will execute the loop body exactly once. Are you sure this is what you want? You can combine all the puts at the end in a single statement. You can replace all the ".gsub(/^\s+/, "").gsub(/\s+$/, $/)" by ".strip. You do not need to append a newline because puts does that already. Why do you use 'entry.search("a")' and do not include the "a" in the path expression? Cheers robert -- remember.guy do |as, often| as.you_can - without end http://blog.rubybestpractices.com/