Ending modifiers
You can execute a simple Perl statement if a condition is true, by reversing the if statement syntax:
statement if condition;
This technique is called an ending modifier.
You can also do this for unless, while, and until, as shown in the following code:
statement unless condition;
statement while condition;
statement until condition;
Related examples in the same category