use Tk; use Tk::BrowseEntry; my @items; my $BrowseEntryindex; my $cur_index; my $mw = MainWindow->new(); $items[0]{'cmd'} = sub{print "First BrowseEntry Index Selected\n"}; $items[1]->{'cmd'} = sub{print "Second BrowseEntry Index Selected\n"}; my $dropdown = $mw->BrowseEntry( -label => 'Items',-browse2cmd => sub{&{$items[$_->{'_BE_curIndex'}]{'cmd'}};} )->pack; $dropdown->insert('end', 'First'); $dropdown->insert('end', 'Second'); $mw->MainLoop;