Questions about this topic? Sign up to ask in the talk tab.
Perl/Basics/Boolean Logic/Statements/And and Or
From NetSec
Revision as of 01:15, 19 July 2012 by Chantal21I (Talk | contribs) (moved Perl/Basics/Statements/And and Or to Perl/Basics/Boolean Logic/Statements/And and Or)
"And" and "or" are used to apply multiple conditions to a boolean statement.
- && is the way perl represents "and"
- || is the way perl represents "or"
Example:
if ($age < 21 && $age >= 18) { print "Some content will be restricted because you are not older than 21.\n"; } |