#!/usr/bin/perl -w # perlCall.pl use Tk; use TK::ROText; # create the Main Windoow my $mw = MainWindow->new; $resultsBox = $mw->Scrolled('Text', -relief => 'sunken', -width => 100, -height => 32, -background => 'gray90', -scrollbars => 'ose', -selectbackground => 'gray60',)->pack(-fill => 'both', -expand => 1); $mw->Button(-text => 'Run Script', -command => \&CallScript)->pack(-fill => 'both', -expand => 1); sub CallScript { @myarray = `perl C:\\IBM\\test_code\\otherScript.pl`; $resultsBox->insert('end', "@myarray"); } MainLoop; #### #!/usr/bin/perl -w # otherScript.pl for ($i = 0; $i < 10; $i++) { print "This is a test at iteration number: $i\n"; } for ($i = 0; $i < 10; $i++) { sleep (1); print "Testing $i, \n"; }