1. Unless control structure
Execute when the condition is false, opposite to if
Else can be attached.
2. Until control structure
If the condition is false, it is executed until the condition is true;
3. Conditional Modifiers
The effect is equivalent:
Similar mode:
4. Bare block control structure
{
Body;
Body;
....
}
Helps to define valid ranges for temporary variables
5. elsif clause
6. Auto-increment and auto-Increment
Same as C Language
7.
Same as C Language
8. For and foreach
In Perl, the two are equivalent, and the pure foreach is preferred.
9. 5 types of cyclic blocks: For, foreach, while, until, and bare Block
Last is equivalent to break in C language, and next is equivalent to continue in C language.
Redo: Re-execute this iteration
10. Tagged Block
Place the label and a colon in the front of the loop. It is recommended that all labels be capitalized;
The tag is used to name the entire code. When necessary, add this tag behind last, next, and redo.
11. Three-object Operator
? : Conditional expression? True expression: false expression
Multiple branches can be written:
12. logical operators
&, |: Consistent with the C language usage
13. Short-circuit Operator
If the value on the left of "|" is false, the value on the right is assigned to $ last_name;
14. "define no" OPERATOR ://
If the value on the left of "|" is a false value, the value cannot be assigned correctly;
No matter whether the value on the left of "//" is true or false, if it has been defined, it is assigned to $ last_name;
15. Word writing
Logic and (&, and), logic or (|, or)