in reply to Newbie TK question

Hi hebes_99,

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.


s''(q.S:$/9=(T1';s;(..)(..);$..=substr+crypt($1,$2),2,3;eg;print$..$/

Replies are listed 'Best First'.
Re^2: Newbie TK question
by hebes_99 (Acolyte) on Jun 07, 2006 at 15:32 UTC
    Beautiful...that worked perfectly..... That is a very straightforward way, and actually makes sense once I see it. Thanks much!!!!!!!!!!!