#!/usr/bin/perl -w use strict; use Tk; use Tk::BrowseEntry; my $mw = tkinit(); my $frame = $mw->Frame->pack; $b = $frame->BrowseEntry(-label => "Label", -browse2cmd => \&show_index); $b->insert("end", "opt1"); $b->insert("end", "opt2"); $b->insert("end", "opt3"); $b->pack; MainLoop; sub show_index { my $self = shift; print shift; }