from perlsyn(1): The following compound statements may be used to control flow: if (EXPR) BLOCK if (EXPR) BLOCK else BLOCK if (EXPR) BLOCK elsif (EXPR) BLOCK ... else BLOCK ... The "if" statement is straightforward. Because BLOCKs are always bounded by curly brackets, there is never any ambiguity about which "if" an "else" goes with. If you use "unless" in place of "if", the sense of the test is reversed.