Uggles has asked for the wisdom of the Perl Monks concerning the following question:

Currently, I have a perl program with a gui in Tk that is essentially a search application. In order to run the search the program parses a certain file type into xml which is done by calling a module that was written exactly for this purpose. The first time that I hit the search button of my gui it works exactly like it is supposed to, but after that the module that creates the xml returns an error saying a certain array hasn't been initialized. Is this a known issue with Tk and GUIs? I don't understand why there would be an issue if I am just calling a module for a second time which is unrelated to the first time.
  • Comment on Tk: Calling Module More than Once Creates Problems

Replies are listed 'Best First'.
Re: Tk: Calling Module More than Once Creates Problems
by Anonymous Monk on Jul 25, 2013 at 03:17 UTC
Re: Tk: Calling Module More than Once Creates Problems
by Anonymous Monk on Jul 24, 2013 at 18:00 UTC

    It would help to strip your code down to the bare minimum that shows the problem, and post that.

    From what you've said, it sounds to me like Tk has absolutely nothing to do with any of it. From your wording, it also sounds like you might be trying to use side effects of loading the module to do your calculation, rather than loading the module once and then calling a sub within it to do the calculation.