OR operator

Updated: 04/26/2017 by Computer Hope

The OR operator is a Boolean operator that executes an operation or task if one or more values or operands are met. For example, 1 + 1 = 3 or 1 + 1 = 2 is true because 1 + 1 does equal 2 even though 1 + 1 does not equal 3. For languages or services that do not accept the word "or" as an operator it is often replaced with the pipe symbol, as shown in the Perl code below.