Logical Operators

Operator Meaning
$a && $b and
$a || $b or
! $a not
$a and $b and
$a or $b or
not $a not

Examples:

if( $a > 5 && $b < 10)
{ 
  ...
} 

$home = $ENV{HOME} || $ENV{LOGDIR} || (getpwuid($<))[7];