>>>>> "Andrew" == Andrew Gaffney <[EMAIL PROTECTED]> writes:

Andrew> I have a Perl script which uses the CGI module which needs to be able
Andrew> to get all the selected items in a SELECT. I see that the request
Andrew> comes in as 'selectname=item1&selectname=item2&selectname=item3'. If I
Andrew> do '$p = $cgi->Vars', wouldn't I only get the last value?

Don't do that.  Use param():

        use CGI qw(param);

        my $one_value = param('selectname'); # gives one of them
        my @all_values = param('selectname'); # gives *all* of them

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

-- 
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