use strict; use warnings; use Tk; my $mw=MainWindow->new(); ... ... ... MainLoop;