in reply to Re^4: need a popup gui stdin
in thread need a popup gui stdin

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