Kickstart has asked for the wisdom of the Perl Monks concerning the following question:
I've got the following snippet that doesn't seem to work. When I run it, it fails and spits out fail 2 and fail 3. I'm afraid I can't see the problem, help?
$contentpost = "id=20010131". "&username=$username". "&password=$password". "&subject=$subject". "&comments=$post". "&submit=Submit"; $contentpost =~ s/ /+/g; $ua = new LWP::UserAgent; my $req = new HTTP::Request 'POST',$formurl || print "fail 1"; $req->content_type('application/x-www-form-urlencoded') || print "fail + 2"; $req->content("$contentpost") || print "fail 3"; my $res = $ua->request($req) || print "fail 4";
Kickstart
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: LWP posting a form
by MeowChow (Vicar) on Feb 06, 2001 at 13:24 UTC | |
|
Re: LWP posting a form
by dkubb (Deacon) on Feb 06, 2001 at 14:03 UTC | |
|
Re: LWP posting a form
by doran (Deacon) on Feb 06, 2001 at 12:58 UTC | |
by Kickstart (Pilgrim) on Feb 06, 2001 at 13:04 UTC | |
by doran (Deacon) on Feb 06, 2001 at 13:11 UTC |