my $debug = FALSE; # or 0 $debug ^= 1; # now it's TRUE, or 1 $debug ^= 1; # now it's FALSE, or 0