In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
Editor to share with you what small things you need to pay attention to in the process of Perl development, I believe most people do not know much about it, so share this article for your reference. I hope you will gain a lot after reading this article. Let's learn about it together.
Several small points for attention in the process of Perl Development
Perl is a scripting language. The original designer was Larry Wall (LarryWall), which was released on December 18, 1987. Perl borrows features from C #, sed, awk, shellscripting, and many other programming languages. One of the most important features is its internal integration of regular expressions and the huge third-party code base CPAN. Perl was originally known as pearl, but before the official release of this language, Larry Wall found that there was a program saying "pearl" and changed the name of the program to Perl.
For work reasons, I have been away from C++ for some time and have been using this so-called scripting language to build some CGI applications. In the process of using this Perl development, found that it is not so simple, a huge language platform, can be said to be the super version of SHELL, can also be the sister version of PHP, unspeakable feeling, anyway, it is quite practical. Here are some notes for your own review, which may remind you who are interested in it.
1. Undef,'',0 means FALSE in logic judgment, but should you note that your business logic is like this? For example, $ABC=$ABC | | 0% ABCategory ABC | | 1, usually | | can be used to set default values. Do you need to make sure that your code describes this logic? My colleagues and I have failed in this place several times. For example, if the user does not choose or * to access the form, the value of the field is UNDEF, but it is all represented by 0. If you take it for granted | | 0, that would be wrong.
2. The coexistence of CGI module and query string (it is estimated that few people will make this mistake, even if they do, it is easy to find). That is, you always need to parse form parameters or URL parameters from < STDIN > or ENV {'QUERY_STRING'}, and then initialize CGI (or load) to read SESSION content.
3. In the process of Perl development, when passing multi-tier reference relationships, try to use temporary variables to save references, otherwise references may make errors. For example, if a function needs a reference array, each element of the array is a reference of an array, and the element of a subarray is a reference of HASH, then you simplify it with two intermediate scalars, otherwise it is not easy to get the assignment right.
4. In the process of Perl development, when you want to achieve some functions that PERL itself cannot achieve, for example, when you have more contact with the system (similar to API function), think of search.cpan.org, your peers usually have ready-made modules for you to call. I can't tell you.
The above is all the contents of the article "what are the small things to pay attention to in the process of Perl development". Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.