You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

12 lines
402 B
Perl

$a || $b # logical or: true if either is nonzero
$a && $b # logical and: true only if both are nonzero
! $a # logical not: true if $a is zero
Perl 5 also defines these logical operators:
$a or $b # another form of logical or
$a and $b # another form of logical and
not $a # another form of logical not
$a xor $b # logical xor: true if either $a or $b is nonzero, but not both