By multiple values did you mean like a multi-selection box? I think that HTTP::Request will handle that with a simple array ref for the value...
use HTTP::Request::Common; use LWP::UserAgent; $ua = LWP::UserAgent->new; my $res =$ua->request( POST 'http://localhost/cgi-bin/printenv', { Who => 'Mark', Why => 'Because', FavColors => ['Blue', 'Red', 'Yellow'], Hair => 'Balding', Etc => 'More Examples' } ); print $res->content;

One hasty modification to printenv gives me:

#!/usr/bin/perl use CGI 'param'; print "Content-type: text/html\n\n"; while (($key, $val) = each %ENV) { print "$key = $val<BR>\n"; } print "<hr>\n"; print "$_ = ".join (", ",param($_))."<BR>\n" for param; ## returns ... QUERY_STRING = <BR> CONTENT_TYPE = application/x-www-form-urlencoded<BR> SERVER_PROTOCOL = HTTP/1.0<BR> SERVER_SIGNATURE = <ADDRESS>Apache/1.3.6 Server at Ruby.hostile.org Po +rt 80</ADD RESS> <BR> REMOTE_PORT = 1062<BR> HTTP_USER_AGENT = libwww-perl/5.48<BR> GATEWAY_INTERFACE = CGI/1.1<BR> HTTP_HOST = localhost<BR> SERVER_SOFTWARE = Apache/1.3.6 (Unix) (SuSE/Linux)<BR> SERVER_ADMIN = root@localhost<BR> REMOTE_ADDR = 127.0.0.1<BR> SCRIPT_NAME = /cgi-bin/printenv<BR> SERVER_NAME = Ruby.hostile.org<BR> DOCUMENT_ROOT = /usr/local/httpd/htdocs<BR> REQUEST_URI = /cgi-bin/printenv<BR> UNIQUE_ID = OoTdKsCoAP4AAFYnESI<BR> REQUEST_METHOD = POST<BR> CONTENT_LENGTH = 99<BR> SCRIPT_FILENAME = /usr/local/httpd/cgi-bin/printenv<BR> PATH = /sbin:/bin:/usr/sbin:/usr/bin<BR> SERVER_PORT = 80<BR> <hr> Etc = More Examples<BR> Hair = Balding<BR> FavColors = Blue, Red, Yellow<BR> Who = Mark<BR> Why = Because<BR>

--
$you = new YOU;
honk() if $you->love(perl)


In reply to Re: HTTP::Request and multiple select by extremely
in thread HTTP::Request and multiple select by Anonymous Monk

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.