in reply to LWP post method, mutliple parameters

Those are for headers, not form params. They'll show up as "val1: 1" in the post header, which you would see if you checked $ENV{HTTP_VAL1} in the form processor, for example.

Replies are listed 'Best First'.
Re^2: LWP post method, mutliple parameters
by davidov0009 (Scribe) on Dec 23, 2007 at 03:14 UTC
    So I'd have to throw all those into the hashref before sending it off via post()? Any better way to do this? I have a subroutine that strips form parameters from source html and returns them as a hash. I want to add more set parameters to that hash and then send them off as a post.

    use strict; use CGI;
      What was in place before was
      $ua->post( $url, [ name => value, name => value ], @header)
      Would it be the same to replace the [ name => value...] with a hashref?

      use strict; use CGI;
        I believe it accepts either an arrayref or a hashref there. You should be using an array ref though, or you won't be able to have multiple values for a given param. That's why it accepts an arrayref there.