Hello, all. I'm trying to pass a variable to one of my subroutines when my users hit a button, but it always complains. Something about an "undefined subroutine".
Here's my code for the -command attribute of the button:
-command => \&subroutine("variable_to_be_passed"),
sub subroutine
{
# Do stuff with the variable here...
}
If you need additional information about my program, let me know. I'm a newbie, so be gentle when you reply. Also - if you didn't catch the thread title, this is in Perl/Tk.
Thanks for any help!
Furry
P.S. This forum is awesome. Love the smileys and icons and especially spell check.
Here's my code for the -command attribute of the button:
-command => \&subroutine("variable_to_be_passed"),
sub subroutine
{
# Do stuff with the variable here...
}
If you need additional information about my program, let me know. I'm a newbie, so be gentle when you reply. Also - if you didn't catch the thread title, this is in Perl/Tk.
Thanks for any help!
Furry
P.S. This forum is awesome. Love the smileys and icons and especially spell check.