Conditional Directives and Context

Learn about the context in which conditional directives are evaluated.

We'll cover the following

The conditional directives if, unless, and the ternary conditional operator, all evaluate an expression in a boolean context. Since comparison operators such as eq, ==, ne, and != all produce boolean results when evaluated, Perl coerces the results of other expressions, including variables and values, into boolean forms.

Boolean values

Get hands-on with 1400+ tech skills courses.