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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.