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

After playing around a bit, here's an example of  STDIN accessibility both before and after the  MainLoop function. I don't know how kosher this may be. Again, this code is launched from the command line.

>perl -wMstrict -le "use Tk; ;; my $text; ;; my $mw = MainWindow->new; ;; $mw->Label(-text => 'Enter text: ')->pack(); $mw->Entry(-textvariable => \$text)->pack(); $mw->Button(-text => 'Submit', -command => sub { $mw->destroy } )->pack(); ;; print qq{before MainLoop: enter text: }; my $pre_ml = <STDIN>; chomp $pre_ml; ;; MainLoop; ;; seek STDIN, 0, 2; print qq{after MainLoop: enter more text: }; my $post_ml = <STDIN>; chomp $post_ml; ;; print qq{before MainLoop: '$pre_ml'}; print qq{in MainLoop: '$text'}; print qq{after MainLoop: '$post_ml'}; " before MainLoop: enter text: Before after MainLoop: enter more text: After all before MainLoop: 'Before' in MainLoop: 'hi there' after MainLoop: 'After all'