Your problem looks like the typical variable lifecycle confusion, reusing already used variable names, too many globals, too many fake globals, globals overwriting fake globals, using same variable name for two different purposes, subroutines which don't take arguments, interleaving code and named subroutine declarations ... you even have "use Tkx;" in there (sloppy)
My standard advice on solving this, improve your program, refactor your program...
Re: Perl Tk Multiple Notebook Editing and Save, Re: widget box problem in tk, Re: TK Submenus (Tk::Menu , global variables/ spirit of strict), Re: print the values of the selected check buttons, Re^5: Multiple frames