On Thu, 14 Mar 2013 16:42:52 +0000 G M <iamnotregiste...@hotmail.com> wrote:
> > Hi, > > Thanks for replying. As far as I understand it will return undef if > no form is found. The form is there so it should do something I > would've though, I tried adding in that line anyway using 1 to > signify the first (and only) form on the page, still get the same > error though :( There are no forms on the page. DB<6> $mech = WWW::Mechanize->new; DB<7> $mech->get( 'http://www.easyjet.com/en/searchpod.mvc/showborderless?aclwidth=279'); DB<8> x $mech->forms; empty array See also: [davidp@supernova:~]$ wget -q -O- http://www.easyjet.com/en/searchpod.mvc/showborderless?aclwidth=279 | grep -i '<form' [davidp@supernova:~]$ WWW::Mechanize wants to be able to find a form to actually submit. You may be able to just fake the request yourself - at a quick glance, it looks like it submits to http://www.easyjet.com/EN/Booking.mvc, so take the field names from the source of the URL you gave before, and POST them at that URL, and see what happens. Failing that, you'll have to use the form in your browser while using an addon like Firebug or something, or capturing HTTP traffic off the wire, and see what happens, and make your script do the same. -- David Precious ("bigpresh") <dav...@preshweb.co.uk> http://www.preshweb.co.uk/ www.preshweb.co.uk/twitter www.preshweb.co.uk/linkedin www.preshweb.co.uk/facebook www.preshweb.co.uk/cpan www.preshweb.co.uk/github -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/