dbmathis has asked for the wisdom of the Perl Monks concerning the following question:
How would I get a url and then pass values into a form and submit using perl?
Here is the code I have so far and it is not working. Please dpon't laugh :)
#!/usr/bin/perl -w require LWP::UserAgent; my $ua = LWP::UserAgent->new; my $url = 'http://someurl.jsp'; my @data = ( ['butt1', 'Resubmit submissions'], ['Max Age', '30'], ['S +ubmissions', '9967569:4524703']); my $response = $ua->post( $url, \@data ); if ($response->is_success) { print $response->content; # or whatever } else { die $response->status_line; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to get a URL and pass values to a form and submit with perl
by Joost (Canon) on Mar 26, 2008 at 19:27 UTC | |
by Anonymous Monk on Mar 26, 2008 at 20:44 UTC | |
by Joost (Canon) on Mar 26, 2008 at 21:07 UTC |