Perl FAQ - FAQ (1)

xiaoxiao2021-03-31  200

What is PERL? Who supports Perl? Who is responsible for development? Why is it free? Which version of Perl I should do? What is the representative of Perl4 and Perl5? Is the development of Perl stabilized? Does Perl are difficult? How does Perl and other program languages? For example Java, Python, REXX, Scheme, or TCL? Can I use Perl to do [some kind of thing]? Which occasions are not suitable for Perl? What is the difference between "Perl" and "Perl"? Is the PERL program be regarded as a Program or Script? What is JAPH? Where can I get the WitticismS in Larry Wall? How do I get a letter, convince my system administrator / boss / subordinate to use the PERL of version 5 / 5.004, not to use other languages?

What is PERL?

Perl is a high-level program that combines the characteristics of many languages ​​by Larry Wall and many other people. It is mainly made by the inexplicable C language, followed by SED, AWK, UNIX Shell, and at least 10 other tools and languages. Perl has strong processing and transform capabilities for Process, file, and text. Therefore, the ability to transform, so on fast prototyping, system tools, software tools, system management, database link, image design, network link, and WWW program design, etc. The task such as the task is particularly suitable for use with Perl. These specialties not only make Perl to become system maintenance managers and CGI's darling, even in even mathematicians, genetics, news practitioners, and even corporate managers have also used Perl, so perhaps you should use it.

Who supports Perl? Who is responsible for development? Why is it free?

Perl freely open release methods must be attributed to the traditional culture of Internet before fever and their author larry wall. Perl is supported by the user. Now Perl's core, standard program library, selective installation module, and instructions you are now reading are from the hand of the obligator. For details, please see the private note at the bottom of the README archive included in Perl.

It is worth mentioning that members of the core development group (called Perl porters) are a group of highly enthusiastic people, which is developed to develop more than what you can imagine, and you can buy more free software. You can obtain information on newly developed plans.

Although GNU places Perl incorporated in its release, there is no thing called "GNU Perl". Perl is not created by both the Free Software Foundation and is not responsible for maintenance. The issuance of Perl is also more open to the GNU software.

If you prefer, you can purchase commercial Perl support. But for most users, informal support is usually quite enough. For details, please see "Where can I buy commercial Perl Support", I will answer.

Which version of Perl I should do?

You should absolutely use the fifth edition. The fourth edition is not only old, the function is limited, but it is no longer maintained. Its last revision (4.036) was in 1992. Perl The latest mass production release is 5.004. When you read this article, we may have released a few formal defect versions, while probably some of the experimental version of the next version. This article has begun to mention the Perl language, which is subject to the current mass production, unless otherwise specified.

What is the representative of Perl4 and Perl5?

Perl4 and Perl5 are informal styles for two different versions of the Perl program, because "Perl5" is simpler than saying "The 5 (.004) version of Perl" is simple. However, some people mistakenly will be: Perl5 is a separate language; this is incorrect. Perl5 is just a name that is common to the fifth major release version (October 1994). Just as Perl4 refers to the fourth main release (March 1991), and Perl1 (Jan 2008), Perl2 (June 1988), and Perl3 (October 1989).

5.0 The issuance is basically starting from scratch, all program code is completely rereaded. It has been modified, the object is guided, fine-tuning, streamlined, and efficient, and the processoform has almost become different from the same. Despite this, the use of the interface is substantially the same, and high consistency is maintained between the previous version.

In order to avoid the confusion of "Perl5?", Some people have completely avoid "Perl5", but use "Perl" to altead the recent Perl version. In fact, it is not so tired.

Is the development of Perl stabilized?

The mass production issued by the inclination and new features is widely tested before the launch. Since the release of 5.000, we have published a mass production issuance one year.

The Larry and Perl Development team sometimes modifies the core part of the language, but always doing every effort to make the new version and the old version consistent. Therefore, although not all Perl4 scripts can run a top seamlessly under Perl5, it is hardly used in the case where the program written by the previous version is almost never happened (unless the program relying on the bugs that has been removed, or Use a very small number of newly added instructions to name it).

Does Perl are difficult?

Perl is not only easy to get started, but it is easy to continue to learn. It looks like most languages ​​you might have touched. So if you only write a C program, or awk script, shell script, or even only Excel's Macro (gauge), you are halfway.

Most of the tasks can only be done with a small part of the Perl language. The motto of the development of Perl is "not only one way can be achieved" (TMTOWTDI; There's more Than One Way to do it, sometimes read "dyman"). Therefore, Perl's learning curve is both flat (easy to learn) and long (if you want, there is a lot of you to learn).

Finally, Perl is calculated as a interpreted language. That is to say, you don't need to test through a middle coding process after writing; this allows you to test quickly and easily test and amplifies. This convenient test is characterized by making the learning curve more flat.

Helps to practice some things in Perl: UNIX experience, experience in almost any programming language, understand the ability of Regular Expressions, and the ability to understand people to write. If you have anything to do with Perl, then you may already have the former, and the examples can usually get free of charge. Also don't forget the new Perl module. The module has a detailed discussion in the first part of this FAQ, and [Don't forget your good friend] CPAN, this will talk in the second part.

How does Perl and other program languages? For example Java, Python, REXX, Scheme, or TCL?

Perl is better in some places, and some are poor. It is precisely that it is better or bad to usually depending on the personal preference, so this problem is likely to set off a buzzing junior in the news discussion group. The best way to compare the difference between the languages ​​is to try the same program as different language write functions. Each of the programs have their respective news discussion groups, you can learn from it (but I hope you are not going to tell people).

Can I use Perl to do [some kind of thing]?

Perl has sufficient elasticity and expansion, from just a short-line file processing to complex system, there is almost no way. For some people, Perl is an ideal alternative to writing a shell program. Others use high-level perl to replace many programs that have just needed to use C or C a class of low-order languages. Which differences have to be handled with Perl, all have to see you (perhaps your manager ...).

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

That is, the language is always convenient for solving certain problems, using small, specializing, and specializes in special purpose design. Perl design is to do our best to meet the needs of various people, so it is not particularly biased anyone. As for examples of special functional languages, two, such as ProLog and Matlab are.

Which occasions are not suitable for Perl?

When your supervisor is prohibited - but be sure to consider replace them :-).

Seriously, if you have useful applications written in another language (and very well), or there is a language that has been designed for some specific work design (for example: proLog, make), this time is not Need to use Perl.

Due to various factors, Perl is probably not suitable for instant internal embedded systems, which are the development of low-level operating systems, such as Drivers or environmental conversion codes of peripherals, complex multi-line shared memory applications, or very large Application. You will find that the Perl itself is not written in Perl.

Just released Perl Pure Code Compiler may help to remove some of the above restrictions, but you have to know: Perl is still an active variable language, rather than solidity type (STATICALY TYPED). As long as you don't use the programs used by nuclear power plants or brain surgery, you will not be disguised by Perl. In this way, Larry can also sleep stable - the stock market analysis is not hereby :-).

What is the difference between "Perl" and "Perl"?

The two are different. Hey, don't you say the difference in ASCII? :-) LARRY is now using "Perl" to represent the language itself, and "Perl" is used to represent the manifestation of the language, that is, the current interpreter. Therefore, the author has a humorous whistle: "Only Perl can interpret Perl". Do you want to follow this usage is your freedom. If you do an anti-th day, we can say "awk and perl" according to the "awk and perl", but you can't put "awk and perl" or "python and perl".

Is the PERL program be regarded as a Program or Script?

It doesn't matter.

According to standard terms, Program refers to programmed programs that have been compiled, converted to machine codes, and multi-time programs; and Script must interpret each execution. However, the Perl program is strictly, it is neither compiled, it is also non-decompiling; because the Perl program can translate the formation element (can be said to be a perl virtual machine [Virtual Machine]) , Or translate into a completely different language, such as C or a combined language. So it is difficult to say that the original code is hard to say to the pure interpretation, or the PARSE-TREE interpretation, the bit element code interpretation, or the purified code compiler; so this question is difficult to give it an exact answer. What is JAPH?

This is some signature files that have been self-proclaimed in the group in the discussion group, about 100 comparatively, can be obtained at http://www.perl.com/cpan/misc/japh .

Where can I get the WitticismS in Larry Wall?

Ether hundred Larry's mellow, from him [in the discussion group], you can get in http://www.perl.com/cpan/misc/lwall-quotes.

How do I get a letter, convince my system administrator / boss / subordinate to use the PERL of version 5 / 5.004, not to use other languages?

If your management class or a mover without support, or unfairly contains a coefficient of the software in the job system purchased, you can try to start with your own interests. Because if the programming designer can get greater productivity by the good and use of Perl structure, functionality, simplicity, and power, the typical manager / boss / employee may be convincing. In addition, using Perl, in general, and other languages ​​may also help reduce delivery. Stressed this argument may be helpful to persuade them.

If your topic encounters a bottleneck, especially questions about translation or testing, Perl can be said to be a way that is feasible and fast. When you say a person, don't forget to mention: Perl has been widely used by many large hardware and hard companies in the world, extremely reliable and effective. In fact, the current Perl has become the standard of the operating system sold by many UNIX industry. And if you cannot use a detailed instructions, including this FAQ to find a solution for your questions, send the POST to the news discussion group.

If you face the sound against Perl upgrades, then tell them that the Perl development team has no longer 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, which can greatly reduce the development time of the plan. Also, telling their differences between the fourth and fifth editions of Perl like awk and c differences (um, maybe there is not so obvious, but you know what I mean). If you want to get support and want to make sure that you can continue to work in the future, then you have to run the support. This probably, it is to run 5.004, although the 5.003 version is still good (it only falls behind, one edition). However, because some serious BUGs have been eliminated between 5.000 and 5.002, you should at least upgrade to high talents than these versions.

转载请注明原文地址:https://www.9cbs.com/read-130992.html

New Post(0)