Thank you Zentara, I have read similar code as you posted and tried the code before I posted this question. The script work fine except for 2 things:-

i.The button freeze once it is hitted, and there is no way to kill the ongoing job.

ii.The entry seem only capture first single word from the command line to show in the text widget, I need the whole command line to be prompt.

Is there any solution fto fix above 2 problems, I don't mind switching to this method if they can achieve my 2 objectives below:-

i. To show the state of the command within the text widget.

ii. There is a way to cancel the ongoing process.

I chosen Tk::ExecuteCommand as it is non-blocking and the button is tactfully turn to "cancel" when a job is running so that user could have chance to cancel an ongoing job.


In reply to Re^2: How to perform a subroutine run in cpan Tk::ExecuteCommand module by Janish
in thread How to perform a subroutine run in cpan Tk::ExecuteCommand module by Janish

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.