##### worker.pl ##### #!/usr/bin/perl use strict; use warnings; $|++;   # ungepuffert schreiben my $i=0; while (1) {        print ++$i, "\n";        sleep 1; } ##### caller.pl ##### #!/usr/bin/perl use strict; use warnings; use Tk; use FileHandle; my $Mw = MainWindow->new (-title => 'Pipetest'); my $LogWin = $Mw->Text (-width => 80, -height => 20)->pack; $Mw->Button (-text => 'Exit', -command => sub { exit })->pack; # Filehandle anlegen my $fh = new FileHandle; # Pipe-open open ($fh, "./worker.pl |") or die "ups... $!"; # Fileevent mit Callback verbinden $Mw->fileevent ($fh, 'readable', \&funktion_die_was_macht); $Mw->MainLoop; ############### sub funktion_die_was_macht {    $LogWin->insert ('end', "Lese " . <$fh>); } #####