But none of them is working. What's wrong? Please help.
#!/usr/bin/perl -w
use LWP::UserAgent;
$ua = LWP::UserAgent->new;
$ua->agent('Mozila/4.0 (....));
use HTTP::Request::Common qw(POST);
my $req = POST 'http://www.bababa.cgi',
["parameter1" => "value","parameter2" => "value"];
$request = $ua->request($req);
$content = $request->content;
LWP::UserAgent
HTTP::Request::Common
also, you have a syntax error in your script which will definetly kill it:
$ua->agent('Mozila/4.0 (....));
there is only one single quote in the argument, should be:
$ua->agent('Mozila/4.0');
I'm not sure what the (....) is for in your code, maybe that was just an example you found, which indicates that it could be filled in with more arguments if needed, it's like:
sub do_this {
....
}
where the .... just means that's where the code you will use goes.
<META HTTP-EQUIV="Expires" CONTENT="0">
<META HTTP-EQUIV="Pragma" CONTENT="no-cache">
</HEAD><BODY BGCOLOR='#FFFFFF'>
<!-- comment here -->
<!-- comment here -->
<!-- comment here -->
<!-- comment here -->
<!-- comment here -->
<!-- comment here -->
<!-- comment here -->
<!-- comment here -->
<!-- comment here -->
<!-- comment here -->
<H1><IMG SRC="../images/88x31_logo_white.gif" WIDTH="88" HEIGHT="31" ALIGN="TOP"
BORDER="0" NATURALSIZEFLAG="3"> Mascot Search</H1>
The following error has occured getting your search details:<BR>
No boundary= in CONTENT_TYPE (application/x-www-form-urlencoded) [M00055]<BR>
Have you tried the <A HREF="browser.pl">browser compatibility</A> test page?<BR>
Please help.