69

Operators
Logical Operators (Compound)

  • In order to combine basic logical expressions

      Operator Operation Example
      || OR $apples || $oranges
      && AND $apples && $oranges
      ! NOT ! $fruit
      <=> "Spaceship" -1 if <, 0 if ==, 1 if >
      cmp Compare -1 if lt, 0 if eq, 1 if gt

  • NOTE: An example using the <=> and cmp operators is presented on the Numerical Sort slide