in reply to Newbie with a TK question

Since you have given non-runnable code, it is more difficult to offer useful advice. A few things come to mind however.

If you want the window to update while a long subroutine is running, you'll need to force it. Put the line $main->update; inside your while loop, probably after each time you want a change to display (each time you modify $var.)

I do have some other commentary. It is highly recommended you put use warnings; and use strict; at the top of your script, at least while you are developing it and especially if you are relatively inexperienced with perl.

Make sure you are using the right quote marks. You have some angled single quotes and angled double quotes in there demarking text. They mean something very different from straight single and double quotes to perl. (Well, some of them do, some have NO meaning to perl.)

To change the states of the check buttons, iterate over them implicitly rather than explicitly.

$_ -> configure(-state => 'disabled') for @check_button;
rather than
for $i (1..6){$check_button[$i] -> configure(-state => 'disabled');}
also, you may want to re enable them at the end of the subroutine.