Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
print <<EOP; <td width="15%"><B>Event:</B></td> <td width="40%"><select name="Event" size="3" multiple> EOP if($eventChoice ne "999999"){ if($eventChoice =~ /(.*)(\,)(.*)/) { print "<option value='$eventChoice' selected >$3</option>\n"; } print "<option value='999999' >All Events</option>\n"; push @EventList,$eventChoice; &PopulateEventDropDown(@EventList); # EventList with eventchoice } else { print "<option value='999999' selected>All Event +s</option>\n"; &PopulateBasicDropDown(@EventList); # Default E +ventList } print <<EOP; </select> sub PopulateEventDropDown { my($Records); my @Records = @_; my $eventChoice = pop @Records; foreach $Records(@Records) { if($Records =~ /(.*)(\,)(.*)/) { if($Records ne $eventChoice) { print "<option value='$Records'>$3</option>\n" +; } } } #end foreach }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Sub Routine
by bschmer (Friar) on Jul 28, 2004 at 19:02 UTC | |
by Anonymous Monk on Jul 28, 2004 at 21:31 UTC |