Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"

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

Replies are listed 'Best First'.
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 '', [ name => 'Gisle Aas', email => '', gender => 'M', born => '1964', perc => '3%', ]);

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

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (6)
As of 2016-10-26 23:45 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (350 votes). Check out past polls.