in reply to Automating Web Forms with a POST method

You can use LWP::UserAgent; to mimic the POST as if it came from filling out the form. The returned page can be appended to a file with open FH,">> eventual.txt"; print FH; (assuming data in $_). Lather, rinse, and repeat.

After Compline,
Zaxo

Update: Extending remarks in response to jettero. '$ man LWP::UserAgent' will get you started. 'apropos LWP' will tell you where to find more. The HTTP:Request module (basic to using LWP::UserAgent) also has a man page. To see what gets sent by the browser, modify the action in the form to read 'mailto:me@localhost' or whatever. You will see that POST consists of 'key=value' pairs, too, but in content rather than as URI modifiers.

Replies are listed 'Best First'.
Re: Re: Automating Web Forms with a POST method
by jettero (Monsignor) on Jul 17, 2001 at 04:41 UTC
    Just how do you get LWP::UserAgent to mimic the POST?
      try something like this (from perldoc lwpcook):
      use HTTP::Request::Common qw(POST); use LWP::UserAgent; $ua = LWP::UserAgent->new; my $req = POST 'http://www.perl.com/cgi-bin/BugGlimpse', [ search => 'www', errors => 0 ]; print $ua->request($req)->as_string;