#!/usr/bin/perl use strict; use Tk; my $main = new MainWindow(-title => "Cooles Ding"); my $label = $main->Label(-text => "Cooles Ding")->pack(); my $outputframe = $main->Text(width => 80, height => 10)->pack(); my $exit_button = $main->Button(-text => "Beenden",                                                              -command => sub {exit} )->pack(-fill => "x"); my $start_button = $main->Button(-text => "Berechnen",                                                              -command => sub {my $output=cap(); $outputframe->insert($output,"insert");} )->pack(-fill => "x"); MainLoop; sub cap { ... rechne rechne rechne ... }