in reply to Troubles when trying to use Tk conditionally

Try
BEGIN { *MainLoop = \&MainLoop; }
near the top of your script (near the use statement), or plain
Mainloop();
instead of the current call.

Even though the function doesn't exist, if it isn't called, it won't complain.

Replies are listed 'Best First'.
Re^2: Troubles when trying to use Tk conditionally
by moritz (Cardinal) on Feb 04, 2011 at 15:19 UTC
      I had thought about that, but I was unsure that it works.

      There's also use subs.