Two things: 1) Your action parameter of the form tag was pointing to a separate program. If you leave it blank (or leave it out altogether), then this same script will process it. 2) You don't need to split param('list') - CGI.pm will automatically make an array for you, if it contains multiple entries.
HTH & Have Fun! Jason #!/usr/local/bin/perl use CGI qw(:standard); $action = param('action'); print header(); print start_html(); if (!$action) { print start_html(); print qq~ <form method="POST" action=""> <input type="hidden" name="action" value="doit"> <font face="arial" size="2"><B>Select List:</B><P> ~; print scrolling_list( -name=>'list', -value=>['List_1','List_2','List_3'], -default=>['List_1'], -multiple=>1 ); print qq~ <input type="submit" value="Submit"></form> ~; print end_html(); } else { @lists = param('list'); print qq|Total: @lists|; } exit(); "Mikeblezien" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > Hello all, > > having a problem with processing multiple selection from a scrolling list... > first time working with tha scrolling list. Here is the test script I'm working > with: > #!/usr/local/bin/perl > use CGI qw(:standard); > > $action = param('action'); > > print header(); > print start_html(); > if (!$action) { > print start_html(); > print qq~ > <form method="POST" action="/mailer/cgi/list.pl"> > <input type="hidden" name="action" value="doit"> > <font face="arial" size="2"><B>Select List:</B><P> > ~; > print scrolling_list(-name=>'list', > -value=>['List_1','List_2','List_3'], > -default=>['List_1'], > -multiple=>1); > print qq~ > <input type="submit" value="Submit"></form> > ~; > print end_html(); > } else { > @lists = split(/ /,param('list')); > print qq|Total: @lists|; > } > > exit(); > > Now I thought that the @list array would store all the selected values from the > list... but it doesn't, just one, even if all the items have been selected from > the list... what am I missing here ?? > > thanks > -- > Mike<mickalo>Blezien > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > Thunder Rain Internet Publishing > Providing Internet Solutions that work! > http://www.thunder-rain.com > Tel: 1(985)902-8484 > MSN: [EMAIL PROTECTED] > =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]