in reply to Get form data from select box, html forms, multiple selection

Here's something to get you started:
#!/usr/bin/perl use strict; use warnings; use CGI; # create new CGI object my $q = CGI->new(); # clean assignment of CGI parameters my %param = $q->Vars(); # $param{list1} contains selected fields separated # by null character \0 my @days_selected = split /\0/, $param{list1};
The @days_selected array contains the data you desire.

Unfortunately the example posted above by AM will only give you the first of the options selected.
Update: Apologies, A, old boy. Thanks, L~R.

bassplayer

Replies are listed 'Best First'.
Re (2): Get form data from select box, html forms, multiple selection
by Limbic~Region (Chancellor) on Nov 17, 2003 at 14:50 UTC
    bassplayer,
    I believe you are mistaken concerning the AM. From the CGI docs:

    Pass the param() method a single argument to fetch the value of the named parameter. If the parameter is multivalued (e.g. from multiple selections in a scrolling list), you can ask to receive an array. Otherwise the method will return a single value.

    Using the Vars method to get all the params into a hash seems like a waste in this case.

    L~R