1.> clear file data and overwrite;> append at the end of the file
2. It is recommended that you close a file handle immediately, regardless of whether the program ends immediately.
3. $! Indicates some readable information generated by the system, such as insufficient permissions and the file does not exist. The information contained in it is only valid when the system request fails.
4. As a general rule (die statement), if a usage error occurs, a line break is added to the message. If it is another error, you need to use it for debugging. Do not add a line break.
5. The removal of warn and die lies in that warn will not exit the program
6. Only Perl successfully reopens a new connection, otherwise the previous connection will not be closed.
7. Hash is similar to map in STL.
8. If the name is preceded by a dollar sign ($) followed by curly braces ({}), it is a hash element.
9: When a value is stored in an existing hash element, the previous value will be overwritten.
10. Access the nonexistent hash element to get UNDEF.
11. to reference the entire hash, use the percent sign ("%") as the prefix. % hash
12. assign values to the hash using the list. Key/value pairs are required. % hash = {"key", value, "key", value ...};
13. assign values to the list using hash, and the result is also a key/value pair. @ My = % hash;
14. You can directly copy the hash using the value assignment method.
15. If one hash is reversed and assigned to another, the key/value can be exchanged. Of course, it is best to ensure that the value is unique.
16. The reverse method is used for retrieval, which is good.
17. For Perl, The => and are the same.
18.-> used for reference.
19. bareword on the left of any large arrow symbol (=>) (a sequence consisting of letters, numbers, underscores, but not digits. It is preceded by an optional plus sign or minus sign) enclosed by quotation marks.
20. The keys function returns all the keys of the hash. The values function returns all values. If there is no element in the hash, the function returns an empty list.