in reply to LWP & POST

Your first instinct was correct. You should let POST do the work of creating your content for you. The mistake is in the way you specify your request to the POST method of Http::Request::Common. From your code, it looks like it should be:
$request = POST 'http://www.server.com/process.create', [ loc => 'AL +', cat => '4' ]; ...
You specify not the server name, but the full request URL as the first parameter to POST. The second parameter to POST is an anonymous array of the the request's key => value pairs. You should also know that Perl will allow barewords on the left side of the => operator, but barewords don't permit characters like "." and "/".
   MeowChow                                   
               s aamecha.s a..a\u$&owag.print

Replies are listed 'Best First'.
Re: Re: LWP & POST
by Anonymous Monk on Feb 15, 2001 at 12:39 UTC
    Thanks but perhaps you misunderstood my question. The form I need to post looks like this.
    <form action="www.server.com/form.html"> <input name="/process.create" value="loc=AL&cat=4"> </form>
    The name of the parameter has to be "/process.create" and the value is "loc=AL&cat=4". I don't know why they did it this way but that's what I have to post. Is there anyway for me to post this form via LWP?
      Then the following should work:
      $request = POST 'http://www.server.com/form.html', [ 'process.create +' => 'loc=AL&cat=4' ];
         MeowChow                                   
                     s aamecha.s a..a\u$&owag.print
        Thank you so much, that solved the problem. :)