in reply to WWW:Mechanize Problem

According to Re: Can't find form method in WWW::Mechanize, you should use form_name() instead of form(). Super Search is your friend.

Replies are listed 'Best First'.
Re^2: WWW:Mechanize Problem
by SavagePerl (Novice) on May 24, 2008 at 01:35 UTC
    I think that is to specify a form by name, form() is supposed to be used to specify which form on the page. Here is the tutorial i am using http://www.perl.com/pub/a/2003/01/22/mechanize.html

      The tutorial you're using is over five years old. In the meantime, it appears that form() has become form_number(). Looking at the WWW::Mechanize documentation, I see no form() method listed, but form_number() does what you want.

      form() was valid at the time the tutorial was written (2003) — in the meantime it's form_name() (name based) or form_number() (numeric index). The change was made to accommodate for the rare case that a form is named "3" (i.e. name, not index)...