perlスクリプトを実行できますTk::ExecuteCommand
use Tk;
use Tk::ExecuteCommand;
$ec = tkinit()->ExecuteCommand(
-command => '',
-entryWidth => 50,
-height => 10,
-label => '',
-text => 'Execute',
)->pack;
$ec->configure(-command => 'perl ./my_other_perl_script.pl');
$ec->execute_command;
$ec->update;
一般に、バッチを実行して Tk GUI を更新するには、ある種の IPC を実行する必要があります。IO ハンドルは Tk でイベントを作成できるためです。Tk::ExecuteCommand
一種の IPC の複雑さを隠します。
それ以外の場合は、独自の IPC スキームを設計できます。おそらく (大まかに言えば) パイプ、フォーク、およびパイプ イベントを IO イベントとしてセットアップし、読み取り専用ログを作成するための重要なコマンドは次のとおりです。
$text->configure( -state => 'normal' );
$text->insert( end => $text_I_just_read_from_the_pipe );
$text->configure( -state => 'disabled' );