Some general thoughts. I don't know much about this general topic, but looking at HTTP::Request::Common, I see that while the discussion therein of the POST method has many text examples in the
POST $url, Header => Value,...
POST $url, $form_ref, Header => Value,...
format, the actual function invocation examples all look like
$request = HTTP::Request::Common::POST( $url, [ %data ] );
or
$ua->request(POST 'http://somewhere/foo', [foo => bar, bar => foo]);
etc., so this "array" (which might be better thought of as a list of paired items) is always passed as an array reference.
Because it's easy in Perl for a function to look at its arguments at run-time and determine if an argument is a simple scalar or some kind of reference and take alternative action accordingly, functions with complex argument lists are often written so that a particular function foo() can be called as any of
foo($string, [ qw(list of stuff) ]);
foo($string, $another_string, [ %hash ]);
foo($string, $second_string, $third_string, \@array);
etc., where the expressions [ qw(list of stuff) ] and [ %hash ] and \@array all produce array references.
BTW: Please don't post text with fields like [some text here] because the [ ] (square brackets) are markup and just create links to nowhere. (Update: Please see Writeup Formatting Tips and Markup in the Monastery.)
Give a man a fish: <%-{-{-{-<
In reply to Re^4: Bug in LWP? Missing cookie
by AnomalousMonk
in thread Bug in LWP? Missing cookie
by BernieC
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |