jlnelson19 has asked for the wisdom of the Perl Monks concerning the following question:

I'm trying to handle a right-click event on individual elements of a tree (Tk::Tree):
$tree->bind('<3>', sub{print "right click"});
The above works fine, but it applies to the entire tree, no matter where you click. What if I add elements like so:
$tree->add("test1", -text => "TEST 1"); $tree->add("test2", -text => "TEST 2"); $tree->add("test3", -text => "TEST 3");
How can I bind events to the individual branches of the tree, so that if a user right-clicks on just the "TEST 2" branch, I can handle it separately?

I assume the same would apply to any list as well. Is there a way to bind events to individual list elements?