use constant DEBUG => 0; if (DEBUG){ # block is optimized away at compile time .... # but I can turn in "on" again easily } # very readable and effective