there is something I am missing .... after i hit submit there is no more processing of remaining code.

You must destroy the MainLoop with $mw->destroy for processing to continue.

$mw->Button( -text => "Submit", #-command => sub {exit} # no good, will exit whole program -command => sub{ $mw->destroy } # good )->pack();
Now, after $mw->destroy, any code after the MainLoop line will start to run, as I showed in Re: need a popup gui stdin

You can then take $text, and run any code you want using it.

However, if you have an external program, which you want to feed $text to on it's STDIN, you have a few choices.

One is to run system or exec, with $text as an argument. Like this:

.... Tk code omitted MainLoop; # after running $mw->destroy, the following lines will get processed h +ere, right after the MainLoop line # if you have an external program to feed $text to, try one of these system( "path_to_program $text"); #or exec ( "path_to_program $text"); # if you want to run your program and get ouput use IPC::Open3; my $pid = open3(\*WRITE, \*READ, \*ERROR,"your_command"); if( ! $pid ){ die "$!\n";} #send $text to your_command's STDIN print WRITE "$text\n"; #get the answer from your_command chomp(my $answer = <READ>); print "response = $answer\n"; #get the error from your_command chomp(my $error = <ERROR>); print "error = $error\n";

I'm not really a human, but I play one on earth.
Old Perl Programmer Haiku ................... flash japh

In reply to Re^5: need a popup gui stdin by zentara
in thread need a popup gui stdin by diamondsandperls

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.