#!/usr/local/bin/perl use Tk; $top=MainWindow->new; $button=$top->Button( -text => 'Hello World.', -command => sub { print "AAA\n";exit; }, ); $button->pack; MainLoop;