in reply to Button Binding

If I'm reading the POD in Tk::bind correctly, the syntax should / could be:
$widget->bind('<Enter>', $submit)
where $submit is a coderef to sub submit { ... }.

Replies are listed 'Best First'.
Re^2: Button Binding
by moz (Novice) on Mar 18, 2015 at 18:33 UTC
    I get the part of binding to a subroutine. My problem is my buttons issue commands and I want to bind a key to invoke the button action. I have tried $widget->bind('<Enter>', $submit->invoke); But it causes issues messing up the frame packing.
       $submit->invoke is not a subroutine reference