use feature(say); use Tk; #create a couple of arbitrary widgets $main=MainWindow->new; $can=$main->Canvas(-width => 600, -height => 400)->pack; $lab=$can->Label(-text => "AAAAAAAA")->place(-x=>100,-y=>100); $but=$can->Button(-text => "BBBBBBBB")->place(-x=>300,-y=>150); #use a key binding to invoke an event $main->bind('',sub{ say $can->find('withtag','current'); #nothing! }); MainLoop;