#Create the tape removal dialog box my $remove_dialog = $win->DialogBox(-title=>'Choose a tape', -buttons=>["Remove", "Cancel"]); #Create the listbox to hold the tape numbers my $remove_list = $remove_dialog->Listbox(-width=>'25', -height=>'5', -font=>$font)->pack; #Get the tapes that are stored my @stored_tapes = getTapes(); #Put each tape in the listbox foreach my $tape (@stored_tapes) {$remove_list->insert('end',$tape);} #Show the $remove_dialog box to the user my $remove_result = $remove_dialog->Show; if($remove_result eq "Remove") { my $test = $remove_list->get('active'); print $test; }