Questions about this topic? Sign up to ask in the talk tab.
Difference between revisions of "Perl/Basics/Boolean Logic/Statements/And and Or"
From NetSec
AlizaLorenzo (Talk | contribs) (Created page with ""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: {{cod...") |
Chantal21I (Talk | contribs) |
(No difference)
|
Latest revision as of 01:15, 19 July 2012
"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"; } |