in reply to Dynamic values in scroll box?

%names = ("Fred", "Wilma", "Dino", "Rock")
That doesn't quite look like a hash - at least I'm not sure you really meant for "Fred" to be the key to the value "Wilma" and "Dino" the key to the value "Rock". Are you talking about an array. Assuming you want to have all of a hash's keys in the box, the syntax is something like
[ keys %names ]

which gives you a reference to an anonymous array, which gets filled with the list returned by the keys function. Read perlreftut, perllol, and perldsc for the full scoop.

If you set size to 1, you'll get a dropdown box, otherwise you'll see a scrolling list with that many items shown at once. This is really an HTML question, not a Perl one.

Makeshifts last the longest.

Replies are listed 'Best First'.
Re: Re: Dynamic values in scroll box?
by coldfingertips (Pilgrim) on Dec 26, 2003 at 05:26 UTC
    I meant a hash, I have an SDBM_File full of names => email addresses and I want to get all the names to be put into a scroll box.