Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: LWP post method, mutliple parameters

by davidov0009 (Scribe)
on Dec 23, 2007 at 03:14 UTC ( [id://658736]=note: print w/replies, xml ) Need Help??


in reply to Re: LWP post method, mutliple parameters
in thread LWP post method, mutliple parameters

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;

Replies are listed 'Best First'.
Re^3: LWP post method, mutliple parameters
by davidov0009 (Scribe) on Dec 23, 2007 at 04:53 UTC
    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.
        This code confused me in the post() method.
        [ name => value, name2 => value ]
        Is that an arrayref with hash values?

        use strict; use CGI;

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://658736]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-26 01:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found