I'm building an option list to be supplied as output to a template using HTML::Template (It's really cool - I just discovered. Thanks to bradcathey who helped with some sample code! (309583).
My code to build the list is as follows:
It works but I would like to know if there's a better way to do it.my $options = ''; while (my @ary = $sth->fetchrow_array()) { # $ary[0] holds the data's id # $ary[1] holds the data $options .= qq~<option value="$ary[0]">$ary[1]~; }
20031206 Edit by Corion: Changed link style to id://
In reply to Concatenating a list... by kiat
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |