in reply to "Unexpected field value" error with WWW::Mechanize
use strict; use warnings; use WWW::Mechanize; use HTTP::Cookies; use Data::Dumper; my $url = 'http://search.cpan.org'; my $searchstring = 'mechanize'; my $mech_obj = WWW::Mechanize->new(); $mech_obj->get( $url ); if( not $mech_obj->success() ) { print "Could not retrieve page:\n"; print $mech_obj->content(); die; } print "all forms:\n", Dumper( [ $mech_obj->forms ] ); $mech->submit_form( form_number => 1, fields => { query => $searchstring, } ); print "content:\n", $mech_obj->content();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: "Unexpected field value" error from HTTP::Headers when using WWW::Mechanize
by bobf (Monsignor) on Mar 18, 2005 at 03:08 UTC | |
by jbrugger (Parson) on Mar 18, 2005 at 08:58 UTC | |
by Anonymous Monk on Jun 10, 2005 at 21:45 UTC | |
|
Re^2: "Unexpected field value" error with WWW::Mechanize
by tphyahoo (Vicar) on Mar 18, 2005 at 09:40 UTC |