One of the Perl common problem sets-application tips

Source: Internet
Author: User
What is Perl?

Perl is a high-level programming language, written by Larry Wall and many others, and incorporates the characteristics of many languages. It is mainly by the ubiquitous C language, followed by the SED, Awk,unix shell and at least a dozen other tools and languages evolved. Perl for process, files, and text has a very strong processing and transformation capabilities, so all the tasks related to rapid prototyping design, system tools, software tools, System management, database links, image programming, network connectivity, and WWW programming, and so on, are particularly suitable for use in Perl. These features not only make Perl a favorite of system maintenance managers and CGI authors, but even mathematicians, geneticists, journalists, and even business managers use Perl, so maybe you should.

who provides support for Perl? Who is responsible for the development? Why is it free?

Perl's free and open distribution is attributed to the traditional culture of the internet before the Fever and its author Larry Wall. Perl is supported by users. Now the core of Perl, the standard library, the selective installation of modules, and the instructions you're reading now are in the hands of the vigilante. For details, see the private note at the bottom of the Readme file attached to the Perl source release.

It is worth mentioning that the members of the core Development group, known as Perl porters, are highly dedicated beings who are fully committed to developing free software that is better than you can imagine and can buy with money. You can obtain a new development plan via news:// of intelligence.

Although the GNU project includes Perl in its release, there is no such thing as "gnu perl". Perl is neither created nor maintained by the Free Software Foundation. Perl's release terms are also more open than GNU software.

You can purchase commercial Perl support if you like. But for most users, informal support is usually quite adequate. For more information, see the answer to "where can I get a commercial Perl support" question?

which version of Perl should I use?

You should definitely use the fifth edition. The fourth edition is not only old, but also more limited in function, and it is no longer maintained. Its last revision (4.036) was in the year 1992. The latest mass release version of Perl is 5.004. By the time you read this article, we may have released a few more formal versions of the error, and presumably some of the experimental versions for the next edition. This article begins with the mention of the Perl language, which is subject to the current mass production issue, unless otherwise specifically noted.

What do perl4 and perl5 each represent?

Perl4 and PERL5 are informal names for two different versions of the Perl programming language, because it's easier to say "perl5" than to say "5th (. 004) version of perl". " But some people mistakenly perl5 it as: "It's a separate language; it's not true." PERL5 is nothing more than a common salutation to the fifth major release (October 1994). Like Perl4 is the fourth major issue (March 1991), as well as PERL1 (January 1988), Perl2 (June 1988), and Perl3 (October 1989).

The release of 5.0 is basically a zero-based version of all code that has been completely written. It has been modular, object oriented, fine-tuned, streamlined, and efficient, so that code has almost become different from the original. However, the interface is still roughly the same, and there is a high level of consistency between the previous versions.

What language is it to avoid "perl5? "This kind of confusion, some people simply completely avoid"perl5", and alone"perl"to refer to the latest version of Perl." Actually, you needn't be so tired.

has the development of Perl stabilized?

Mass-production distributions that combine debugging and new functionality are tested extensively before they are launched. Since the release of 5.000, we have published a mass production issue on an average of one year.

Larry and the Perl development team sometimes modify the core of the language, but always do everything in their power to keep the new version consistent with the old ones. Therefore, although not all PERL4 scripts can run seamlessly under PERL5, it is almost never the case that an upgrade caused a program that was written in the previous version of Perl to be unusable (unless the program relies on a bugs that has been removed or is named with a handful of newly added instructions).

Is perl difficult to learn?

Perl is not only easy to get started with, but also easy to learn. It looks like most of the languages you might have contacted. So if you've only written a C program, or awk script, shell script, or even just the macro of Excel, you're halfway there.

Most tasks require only a small portion of the Perl language to complete. The motto of developing Perl programs is "more than one way to achieve" (TMTOWTDI; There ' s more Than one Way-do it, sometimes read as "Timmy pitching"). As a result, the Perl learning curve is flat (easy to learn) and long (if you want to, there's a whole bunch of them that you can learn).

Finally, Perl (usually) is interpreted as a language. That is, you can test your program without having to pass through an intermediate coding process, which allows you to quickly and easily test and debug. This convenience test features the learning curve to become even more flat.

It helps to learn something about Perl: Unix experience, the experience of almost any programming language, the understanding of regular expressions (formal notation), and the ability to read programs written by others. If you have anything you want to do with Perl, you may have done it before, and the examples are usually free. And don't forget about the new Perl module. Modules are discussed in detail in the third part of this FAQ, and "Don't forget your good friend" CPAN, which is in part two.

How does Perl compare with other programming languages? such as Java, Python, REXX, Scheme, or TCL?

Perl is better in some places and less in some places. Exactly what is good or bad in the final analysis is usually a matter of personal preference, so asking this question in a news discussion group is likely to set off a constructive jihad.

The best way to compare the similarities and differences between languages is to try to write programs that have the same function in different languages. Each programming language has its own news discussion group, and you can learn from it (but hopefully you're not going to argue with people).

can I do "some sort of errand" with Perl?

Perl is resilient and extensible enough to have little to do with just a single line of file processing work to a complex system. For some people, Perl is an ideal substitute for writing shell programs. Others use higher-order Perl as a substitute for many programs that previously needed to be achieved in a lower-order language such as C or C + +. It all depends on you (and perhaps your manager ...) about which errands to work with in Perl. )。

If you have a library that provides an API, you can use C or C + + to write a Perl extension and then dynamically load any part of the library into your Perl master program. You can also, in turn, write the main program in C or C + +, and then insert some Perl code in the form of instant dynamic loading, creating a powerful application.

Having said that, it is always convenient to solve certain problems by using small, specialized, specially designed language for specific purposes. Perl's design is to try to meet the needs of different people, and thus not particularly biased against anyone. For examples of special functional languages, just give two, such as Prolog and Matlab.

What situations don't fit in Perl?

When your supervisor is forbidden--but be sure to consider replacing them.

To be honest, if you already have an application written in another language (and well written), or if you already have a language designed for certain tasks (such as Prolog, make), you don't need Perl at this point.

Due to various factors, Perl may not be suitable for real-time embedded systems, low-level operating system development work, such as peripheral equipment drivers or environment conversion code, complex multi-line common memory applications, or very large applications. You will find that Perl itself is not written in Perl.

The newly-released Perl pure Code compiler or license helps to remove some of these limitations, but you should understand that Perl is still essentially an active variable language (dynamically typed language) rather than a solid variable (statically typed). As long as you do not use the program of a nuclear power plant or a brain surgery monitor in Perl, you naturally don't get into trouble. So Larry can sleep better at night--not in the stock market Analysis program.

What 's the difference between "perl" and "perl"?

The difference is one bit. Oh, you don't mean the difference in ASCII? Larry now uses "perl" to represent the language itself, and "perl" to represent the language's embodiment, the current interpreter. Thus, the author said in a humorous little phrase: "Only Perl can interpret perl". " It is your freedom to follow this usage. As a dots, we can say that "awk and perl" also have "python and perl", but they cannot put "awk and perl" or "python and perl" together.

should Perl be a program or script?

is irrelevant. In standard terms, program refers to programs that have been compiled by the compiler, converted to machine code, and executed multiple times, and script must be interpreted through a translation program every time it is executed. However, Perl programs are strictly neither compiled (compiled), nor translatable (interpreted), because Perl programs can be translated into bit-code form (some kind of perl virtual machine [virtual machine]), or translated into completely different languages, such as C or combination language. So it's hard to see the original code is it really for the pure interpreter, or Parse-tree interpreter, bit code interpreter, or pure code compiler and write; so it's hard to give a definitive answer to this question.

What is Japh?
This is the signature file of some of the people in the past who claimed to be ' just another Perl hacker ' in the discussion group, some 100 relatively early ones, which can be obtained in

where can I get Larry Wall's witty irony (witticisms)?

More than 100 Larry's irony, derived from his "in the discussion group" posts or the original code, can be obtained in

How can I win the trust and convince my system Manager/supervisor/subordinate to use the 5th/5.004 version of Perl instead of other languages?
If your management or your subordinates are wary of software that is not supported, or software that is not formally included in the operating system you are buying, you can try to do something to help their own interests. The typical manager/boss/employee may be persuaded to do so if the programmer can gain greater productivity by leveraging Perl's structure, functionality, simplicity, and power. In addition, the use of Perl, in general, compared with other languages, may also help to reduce the time of delivery. Emphasizing this argument may be helpful in persuading them.

Perl can be said to be a viable and fast solution if your topic hits a bottleneck, especially with regard to translation or test issues. When you are a lobbyist, do not forget to mention that Perl has been widely and extensively used by many of the world's largest software and hardware companies, and is extremely reliable and efficient. In fact, Perl has become the standard for operating systems that are sold by many UNIX operators. And if you can't find answers to your questions in a detailed usage statement, including this FAQ, send a post to the news discussion group.

If you have a voice against Perl upgrades, tell them that the Perl development team has completely ceased to maintain or support the fourth edition of Perl. Another big selling point of PERL5 is that it has a large number of modules and extensions that can greatly reduce the development time of the project. Also, tell them that the difference between the fourth and fifth versions of Perl is as different as awk and C + + (well, maybe not so obvious, but you know what I mean). If you want support and want to make sure that the software you're developing is going to work in the future, then you have to run a supported version. This probably means to run the 5.004 version, although the 5.003 version is still good (it only falls after one year, one version). However, because some serious bugs have been eliminated between versions 5.000 and 5.002, you should at least upgrade to a higher level than these ones.
Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.