1. Write the code and # Run the CHMOD 755 file name directly.
2. debugging is also possible, # Perl-M file name
3. Transfer characters only play a role in double quotation mark strings, and scalar variable interpolation is also the same
4. Use a scalar variable directly, starting with $
5. Use string connection.
6. Use/before the variable. The variable will not be interpolated. "/$ variable name"
7. Use {} to enclose variables to ensure matching
8. 2 **, 3 to the power of 2 // It's really convenient.
9. Combine operators on the left to calculate the left, and combine operators on the right to calculate the right. // See the appendix.
10. The string '0' is not null, but is false when it is used for if judgment. The variable is not assigned a value, and its value is UNDEF. If is used for judgment, the value is false.
11. Input $ text = <stdin> from the keyboard;
12. Chomp (# text); remove the line break at the end of $ text, such as chomp (# text = <stdin> );
13. Chomp only removes one linefeed // Number of linefeeds, And the return value is the number of linefeeds removed from it.
14. Brackets can be omitted unless they are removed.
15. All numbers are internally converted to double (double-precision floating point number). Some special operations are converted to int (integer) calculations, such as %
16. Defined Function, used to determine whether the variable is UNDEF
Operator priority and associativity (from high to low)
Associative Operators
Parameters of left brackets and list Operators
Left->
++ -- (Auto increment and auto increment)
Right **
Right /! ~ +-(Unary operator)
Left = ~ !~
Left */% x
Left +-. (binary operator)
Left <>
Named unary operators (-x filetests, RAND)
<<=>> = Lt le GT Ge ("unequal ")
=! = <=> EQ ne CMP ("equal ")
Left &
Left | ^
Left &&
Left |
.....
Right? (Ternary operator)
Right = + =-=. =
Left, =>
List operators (rightward)
Right not
Left a nd
Left or XOR