Table 7-3. Logical Operators(表7-3 邏輯操作符)
example name result?/FONT>
$a and $b And True of both $a and $b are true.?/FONT>
$a or $b Or?/FONT> True if either $a or $b is true.?/FONT>
$a xor $b Or?/FONT> True if either $a or $b is true, but not both.?/FONT>
! $a Not?/FONT> True if $a is not true.?/FONT>
$a && $b And?/FONT> True of both $a and $b are true.?/FONT>
$a || $b Or?/FONT> True if either $a or $b is true.
兩種不同“and”和“or”操作符的變化實際上是由於操作的不同優先級別而造成的。(參考以下內容。)