#!/Perl/bin/perl use strict; use warnings; use Tk; my $mw = Tk::tkinit(); my $l = $mw->Label(-text => 'inhalt')->pack(); $mw->Button(-text => 'löschen', -command => sub{ $l->configure(-text => ''); })->pack(); $mw->Button(-text => 'random number einfügen', -command => sub{ $l->configure(-text => 'random number'); })->pack(); $mw->MainLoop();