#!/usr/bin/env perl use strict; use warnings; use Tk; use Tk::BrowseEntry; my @choices = 'A' .. 'Z'; my $picked = $choices[0]; my $picked_ref = \$picked; my $mw = MainWindow::->new(); $mw->BrowseEntry( -variable => $picked_ref, -choices => \@choices, )->pack(); $mw->Button( -text => 'Print Choice', -command => sub { print "Choice: $$picked_ref\n"; }, )->pack(); MainLoop();