Or, a bit shorter:
$toggle_autoplay ^= 1;
Just to confuse things,
$toggle_autoplay == 0 ? $toggle_autoplay = 1 : ($toggle_autoplay = 0);
would have worked (because it fixes the precedence problem you were having).
In reply to Re^2: Tk starting and stopping an autoplay loop using a keybinding
by tybalt89
in thread Tk starting and stopping an autoplay loop using a keybinding
by Discipulus
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |