A select few --#-- I've saved the hardest for last -- the drop down boxes, or <select>. Not only must you grab the whole, multi-lined select element and insert a SELECT on the correct OPTION line. There are at least two prominent styles of coding select boxes -- with and without a VALUE parameter.

We'll worry about the style differences in a minute. First let's grab all of them in a form. For selects, we won't just push the name onto an array, we'll push the whole element <select ...> ... </select>. Note, that this involves reconstituting the part of the element that was lost in the the split.

sub getSelects { my($html) = @_; my @s = (); my @selects = split(/