in reply to Newbie TK question
That's a very good question, actually.
Here's one straightforward way to do it, assuming you have a package called my_functions, and you want to call my_functions::subbie_1:
$ent->bind('<Return>'=> sub { my_functions::subbie_1() });
What the above code does is to create an anonymous (ie. unnamed) subroutine, which is a pointer to a subroutine that gets invoked whenever the Return key is struck.
You can also call subbie_1 with arguments if need be, of course.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Newbie TK question
by hebes_99 (Acolyte) on Jun 07, 2006 at 15:32 UTC |