A Perl if statement consists of a Boolean expression followed by one or more statements.
The syntax format is as follows:
if(boolean_expression){ #Execute when boolean_expression is true}
If the boolean_expression is true, the code block within the if statement will be executed. If the Boolean expression is false, the first set of code after the end of the if statement (after the closing bracket) will be executed.
Executing the above program, the output result is:
The value of a less than 20a is: The value of 10a is: