use warnings; use strict; use Tk; my $mw = MainWindow->new(); # oder new(-background => '#FFFFFF') my $b_yel = $mw->Button( -command => [sub{$mw->configure(-background => '#FFFF00')}], -text => 'Gelb' )->pack(); my $b_mag = $mw->Button( -command => [sub{$mw->configure(-background => '#FF00FF')}], -text => 'Magenta' )->pack(); $mw->configure(-background => '#FFFFFF'); MainLoop();