$f->Button(-text => "Display", -command =>\&tged)->pack(-side => 'right'); sub tged { @chars=$t->get('sel.first','sel.last'); #print "\nSelected word:"; #print @chars; } 1;