use strict;
use warnings;
use Tk;

# Das MainWindow erzeugen
my $mw = MainWindow->new(-background => 'lightskyblue1');

# MainWindow: Groesse-X und -Y, Position -X und -Y
$mw->geometry("220x150+100+120");

# Titelzeile
$mw->title("Die Suche nach Weisheit");

# Textfeld im Fenster
$mw->Label( -text=>"Hallo Universum!",
            -font => "Helvetica -20 bold",
            -background => 'lightskyblue1' 
          )->pack(-ipady => '5');

# Ein Button mit wechselnder Beschriftung
my $time = localtime();
$mw->Button(-textvariable => \$time,
            -command => sub { $time = localtime() },
           )->pack(-pady => '5');
           
# Ein Button zum Beenden
$mw->Button( -text => "Kill mich",
             -foreground => 'red',
             -command => [$mw => 'destroy']
           )->pack(-pady => '5');

MainLoop;
