This will not work, and will print 5,5 regardless which checkbutton you click. The issue is that you used the latest value of $x and $y, not the value at the time when the checkbutton is defined.
In reply to Re^2: Perl/Tk : Trouble with commands and Checkbuttons
by pg
in thread Perl/Tk : Trouble with commands and Checkbuttons
by Petras
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |