in reply to shortin this code up

Rather than duplicate code, you should consider a looping construct, which has the added benefit of simplifying code maintenance when you make any changes (as you'd only need update one piece of code to affect all instances).

foreach my $idx (qw( 7 9 11 )) { my $next = $idx + 1; if ( $slog[$idx] && $slog[$next] ) { (@nslog) = split(/\n/, $slog[$next]); print "<br><b>$slog[$idx]:</b> <select name=\"$slog[$idx]\">"; foreach $line (@nslog) { print "<option value=\"$line\">$line</option>"; } print "</select>"; } }

    --k.