> Have I missed something, i.e. does the MainLoop() function > not work if your > main code is inside a sub main?, or is this because nobody > has built a huge > script yet using TK?
You don't have to use global variables unless you want to. I myself prefer to pass lexically scoped variables into the callbacks whenever possible. You can even enable object-oriented behavior by passing in the object reference as the first parameter. If you're looking for a really huge script written for Perl/Tk, might I recommend a project I'm currently heading up called Guido, which is a Perl/Tk GUI builder. I don't know how many thousands of lines of code we've got in there. (http://www.sf.net/projects/guido/) Since it's my project, I'm not qualified to say whether it's an example of good code or not, but there's plenty of examples of lexically scoped variables being passed to event handlers as well as other tricks. You can browse the CVS repository at the URL I pasted in (that way, you don't have to download the distribution unless you want to). jpt _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users