in reply to Populating a CGI scrolling list from a database
selectall_arrayref returns an array ref of rows, and each row is an array ref again, so it looks like this:
my $doclist = [['prod1'], ['prod2']];
You can remove remove these easily:
my @flat_doclist = map $_->[0], @$doclist; # and then later: print scrolling_list(-name => 'cboProj', -values => \@flat_doclist);
See also: perllol, perldata, perlreftut.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Populating a CGI scrolling list from a database
by davies (Monsignor) on Feb 15, 2011 at 16:27 UTC |