in reply to Perl Tk unable to return from MainLoop when implemented in a subroutine

G'day ngocanh,

Welcome to the Monastery.

This has been discussed before. Take a look at:

— Ken

  • Comment on Re: Perl Tk unable to return from MainLoop when implemented in a subroutine

Replies are listed 'Best First'.
Re^2: Perl Tk unable to return from MainLoop when implemented in a subroutine
by Anonymous Monk on Mar 23, 2016 at 12:58 UTC

    Yes I am aware, I actually learnt how to create the GUI from these posts. That is why I do not understand my program hangs after the button click.

      The referenced threads do appear to accomplish what you ask for. However, I consider it a bad idea to mix GUI with command-line interface in the same script. It may confuse your users more than help them. The somewhat non-standard code will be a maintenance problem for the life of your script.
      Bill