Yes, you can simulate form submissions in Perl. You can use LWP::Simple for get requests, which is what you appear to need here. The basic syntax is like the following:
use LWP::Simple; use URI::URL; my $url = url('http://www.perlmonks.org/index.pl?node_id=32057&lastnod +e_id=3628'); # Yes, the following is insecure and can be sniffed! $url->query_form(username => 'joe', password => 'schmoe'); $content = get($url);
If you need a post request, you should use LWP::UserAgent.

The problem you have is the password. If you're using HTTP authentication, you should use the LWP::UserAgent module, which can easily handle said authentication (I am assuming that your issue is not wanting to send the password as plaintext). There is a way to do form submission with Perl over a secure server, but I can't find the reference right now :(

If you'd like to know the nitty-gritty about Web automation, check out Web Client Programming with Perl which is out of print, but available through the O'Reilly Open Books Project (how many publishers do you know who release out-of-print books for free over the web?).

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just go the the link and check out our stats.


In reply to (Ovid) Re: Form submission simmulation by Ovid
in thread Form submission simmulation by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.