Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Submit a form using perl module

by Anonymous Monk
on Jul 04, 2005 at 21:16 UTC ( #472303=perlquestion: print w/ replies, xml ) Need Help??
Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, Is there any module to submit a form using a perl module? with out having to click the submit button manually? We are looking to automate some of the stuff. Thanks a lot Hemanth

Comment on Submit a form using perl module
Re: Submit a form using perl module
by Corion (Pope) on Jul 04, 2005 at 21:18 UTC

    Yes. There is WWW::Mechanize, which is the easiest method. There also is HTTP::Request, which is the hard way, and which is what WWW::Mechanize uses.

      The user places the request using LWP (LWP::UserAgent, even) rather than HTTP::Request, as shown in the following example:

      use HTTP::Request::Common; $ua = LWP::UserAgent->new; $ua->request(POST 'http://example.com/survey.cgi', [ name => 'Gisle Aas', email => 'gisle@aas.no', gender => 'M', born => '1964', perc => '3%', ]);

      HTTP::Request could have been used instead of HTTP::Request::Common.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://472303]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2015-07-05 21:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (68 votes), past polls