use warnings; use strict; use Tk; my $mw = tkinit; my $n = $mw->NoteBook()->pack; for(qw/foo bar baz/){$n->add($_, -label => $_, );} $n->bind('<3>',[\&process_bt3,Ev('x'),Ev('y')]); MainLoop; sub process_bt3{ my ($w, $x, $y) = @_; my $selected = $w->identify($x,$y); print "selected Tab: $selected\n" if( $selected ); }