in reply to Re: How to keep the state of a drop down select box in perl
in thread How to keep the state of a drop down select box in perl

for things like:
<select name="dropdown"> <option>Option 1</option> <option>Option 2</option> <option>Option 3</option> </select>
I usually use map:
my @options = ( 'Option 1', 'Option 2', 'Option 3', ); @options = map { "<option>$_</option>" } @options; print '<select name="dropdown">', @options, "</select>\n";

Replies are listed 'Best First'.
(bbq) Re: Re: Re: How to keep the state of a drop down select box in perl
by BBQ (Curate) on Dec 16, 2000 at 13:18 UTC
    Yes, but... that doesn't actually output a selected option! :) The question was on how to keep the state of a dropdown box. I guess mine doesn't work either since I am only counting on a single select dropdown, and just looking over it occured to me that it would break under a multiple select.

    eeeek!

    #!/home/bbq/bin/perl
    # Trust no1!