Wiggins d Anconia wrote:

I have a Perl script which uses the CGI module which needs to be able

to get all the


selected items in a SELECT. I see that the request comes in as 'selectname=item1&selectname=item2&selectname=item3'. If I do '$p =

$cgi->Vars', wouldn't


I only get the last value?


From the CGI.pm docs:

"When using this, the thing you must watch out for are multivalued CGI parameters. Because a hash cannot distinguish between scalar and list context, multivalued parameters will be returned as a packed string, separated by the "\0" (null) character. You must split this packed string in order to get at the individual values. This is the convention introduced long ago by Steve Brenner in his cgi-lib.pl module for Perl version 4."

Good to know.


--
Andrew Gaffney
Network Administrator
Skyline Aeronautics, LLC.
636-357-1548


-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>




Reply via email to