in reply to Tk::BrowseEntry return value

Modified your code a little bit:
  1. Set variable option for your BrowseEntry, and that variable will hold the selection.
  2. Completed your return_value function to print out the selection, so you can verify it.
Tested and worked.
use strict; use Tk; use Tk::BrowseEntry; # Create the main window my $mw; $mw->{main} = MainWindow->new; # Create the browse entry my $v; $mw->{a} = $mw->{main}->BrowseEntry(-variable => \$v, -label => "Selec +t one:")->pack; $mw->{a}->insert("end", "one"); $mw->{a}->insert("end", "two"); $mw->{a}->insert("end", "three"); my $frame = $mw->{main}->Frame()->pack(); $frame->Button(-text => "Ok", -command => \&return_value )->pack(-side => 'left'); $frame->Button(-text => "Exit", -command => sub{ $mw->{main}->destroy } )->pack(-side +=> 'left'); MainLoop; sub return_value { print "return value is $v\n"; }