in reply to Calling subrutine after creating Tk mainwindow

By calling MainLoop, the program doesn't continue, it waits for the main window to stop. You can add events to the loop, though: for example, if you want to run something immediately after the creation of the window, you can use after(0,...):
$mw->after(0, sub { doSomething($mw) });

Be sure to place this before calling the main loop! It tells the main window to call the given subroutine after 0 miliseconds once the main loop is entered.

($q=q:Sq=~/;[c](.)(.)/;chr(-||-|5+lengthSq)`"S|oS2"`map{chr |+ord }map{substrSq`S_+|`|}3E|-|`7**2-3:)=~y+S|`+$1,++print+eval$q,q,a,