in reply to CGI Programming Style With Empty Params

OK, I'll have a stab at how I would do your code-
some shortcuts for simplicity sakes, no error checking
my $day = ($base_vars{'day'} > $q->param('arrday')) ? $base_vars{'day'} : $q->param('arrday'); my $days_select = '<select><option></option>'; for (1..31) { my $s = ($_ == $day) ? ' selected' : ''; $days_select .= qq{<option$s></option>\n}; }

Untested. I hate calling a function (method) inside the loop if I can avoid it.

Tiago