# This subroutine will move the selected solution from the AvailListbox # to the SelectListbox sub select_soln_step() { # Get the contents of the current selection my $selIndex = $AvailListbox->curselection(); # If no item is selected, we do nothing. unless($selIndex eq "") { my $selection = $AvailListbox->get($selIndex); # Remove the selected value from the AvailListbox, and add it to the SelectListbox $SelectListbox->insert('end', $selection); $AvailListbox->delete($selIndex); } } # This subroutine will move the selected solution from the SelectListbox # to the AvailListbox sub deselect_soln_step() { # Get the contents of the current selection my $selIndex = $SelectListbox->curselection(); # If no item is selected, we do nothing. unless($selIndex eq "") { my $selection = $SelectListbox->get($selIndex); # Remove the selected value from the AvailListbox, and add it to the SelectListbox $AvailListbox->insert('end', $selection); $SelectListbox->delete($selIndex); } }