in reply to hash referencing with LWP
In the snippet POST => $URL, the fat comma makes POST a plain old string, rather than a call to the HTTP::Request::Common method named POST.
The POST method takes the key/value pairs as an array ref, rather than a hash ref. That's just a convention that a lot of modules use.
The POST method actually returns an HTTP::Request object itself.
So, you want to do this instead: my $req = POST $URL, [ %form ]; Refer to the docs for HTTP::Request::Common and HTTP::Request for more examples.
|
|---|