I'm not really seeing any major delays on the Solaris SPARC system I am using here (the only thing that has Perl and Tk on it). Quite frankly, you are not doing that much, so why it is taking so long is a mystery to me. I'm not not sure if you are running it with "-w" but if so then is the Tk module generating a lot of warnings? I don't know if it was written with warnings in mind or not and I believe the "-w" will force warnings on everywhere. You might want to try running the script without warnings or just switch to "use warnings" which will affect just your code. Also, you shouldn't need a "require Tk". If it only works with that then you may want to look into why that's the case.
There is one Tk trick I have heard of that could help as well. The trick is to hide the window, create the rest of the GUI, and then display it. The changes for this are shown below.
#....
my $main = MainWindow->new();
# Add this line to hide the window
$main->withdraw;
$main->title("Button Window");
$main->configure(-background=>'#c0c0c0');
$main->optionAdd('*BorderWidth' => 1);
my $bottom = $main->Frame(-background=>'#c0c0c0')->pack(-expand=>0, -f
+ill=>'both');
my $sub_button=$bottom->Button(-width=>40, -background=>"#c0c0c0", -fg
+=>'black', -text=>'CLICK ME', -font => ['Courier', 10], -command=>\&c
+lick);
$sub_button->pack(-side => "bottom", -anchor => "s", -expand => "n", -
+fill => "none");
# Add these two lines to display the window after you have finished cr
+eating the GUI
$main->deiconify;
$main->raise;
MainLoop();
#...
Elda Taluta; Sarks Sark; Ark Arks