use strict; use warnings; use Tk; my $mw = MainWindow->new(); my $Variable; {verschiedene Widgets} MainLoop; sub x { ... } sub y { ... }