The Perl Tutorial: What's perl? (1)

xiaoxiao2021-03-06  70

http://www.sitepoint.com/Article/perl-tutorial-whats-perl

The Perl Tutorial: What's Perl? (What is Perl?)

By Boris Mordkovich March 15th 2001 Reader Rating: 8.1 Nov 24th 2004 YJGX007 Translation

Write at the beginning, why? One is personal interest, plus I know very little about the Perl language, I hope to fill a blank that has already paired the Perl language. If you are like me, you may sit down, then slowly taste the Perl language with me.

Perl is a simple language specially available for practical applications. It is a free language. In web development, it is used to do many different things, from writing CGI scripts to help system administrators to maintain their systems, Perl by Larry Wall (Translation 1) creates and maintains it. It is slower than the compilation language C, but it has been compiled again than the interpretation language, and it is executed and explained. The Perl compiler exists, but it is still not good. To learn more about the Perl compiler, go to the Perl home page.

Perl is short for Practical Extraction and Report Language. It's a language that is available free over the Web, and it's used for a variety of things, from writing CGI scripts to assisting administrators in maintaining their systems. Perl was created, and is still maintained , by Larry Wall. It's slower than C, but faster than a normal interpreted language. Instead, it's compiled when executed and then interpreted. A Perl compiler does exist but it's still under development. For more information on compiled Perl go to the Perl Home Page.

I have mentioned that Perl is free, it is released under the GNU license, and the source code can be obtained from the PERL's home page, so that you can customize Perl to make it more flexible and easy to use without too much constraint. Perl does not depend on platform restrictions, it works well on many different platforms, including UNIX, Windows, and even DOS. The code's correction will depend on any particular function of any system.

As I mentioned earlier, one of the nice things about Perl is that it's free. It's distributed under the GNU license, and the source is available from the Perl Home Page. This, along with the fact that it's flexible and has very few constraints, helps make Perl a popular language. It's also highly platform-independent, and has been ported to many different platforms including Unix, Windows, and even DOS. Code modifications can be minor or major depending on any system specific functions that are used. In fact Perl's popularity is very high, you can find relevant support in many places. Recommend a PERL's top site: Comp.lang.perl / # nlt # / perl newsgroup, there are many Perl experts waiting for you there.

Perl's popularity has also been encouraged by the fact that you can find support in a variety of places. At the top of the list is the comp.lang.perl / # nlt # / Perl Newsgroup, which is moderated by a number of Perl experts .

Perl and CGI (Perl and CGI)

Here is a brief explanation of Perl and CGI. If you have already or think of the establishment of a self-requested Web site, you must have heard HTML, JavaScript, Java, and CGI. The CGI is all called CommON Gateway Interface (public gateway interface). Different from JavaScript, HTML, and client Java, in the server, CGI provides a set of standard methods: use any language writing server program, and complete response to the web page with the web server software. In other words, the CGI is a part of the application as part of the Web site and the application running on the server.

THIS A Brief Explanation of Perl and cgi. If you have, or Want To, Put Up Your Own Web Site, You'll Have HEARD of HTML, JavaScript, Java, And CGI. CGI Stands for the Common Gateway Interface. CGI IS unlike Javascript, HTML, and Client Side Java. CGI provides a standard method for programs written in any language to run on the server side, and to communicate with the Web server software in response to requests for Web pages. in other words, CGI is The Part of Your Web Site That Communicates With The Other Program Running On Your Server. The main purpose of writing CGI programs or scripts is to provide more interactive effects for your Web site. Many web sites are static, not allowing users to interact, typical interactions have a message, a picture counter, a storage order, access a database, other application access, and more.

The main purpose of writing CGI programs or scripts is to afford more interactivity on your web site. Many web sites are static, and do not allow much user interaction. Others have guestbooks, image counters, and allow you to place orders, access databases And Other Useful Applications. In order to perform these interactions, you must have an application running on the server, for example, how to handle the user's various inputs, I have mentioned in front of the CGI script can be written in any language, but More common is Perl and C. Perl is a better language for writing CGI scripts because it has powerful string processing capabilities. There are still other languages, such as Java and PHPs, have such functions, but they do not use CGI.

This is where CGI comes in. In order to implement these types of interactivity, you must have an application running on the server that, for example, knows how to process certain types of user input. As I mentioned, CGI scripts can be written in any language, but the most common are Perl and C. Perl is the preferred language for writing CGI scripts because of its strength in string manipulation. and now other programming languages ​​such as Java and PHP are also gaining popularity, as they provide interactivity without the Use of cgi.cgi procedures is only to process some specific inputs and output (the writing of the program is not required). When the client user fills in the form (a set of HTML tags, allowing the user to submit input) and submitted to the server, the service will handle the input of the form and resolve the CGI program and finally return HTML code to answer customers. Did user request.

CGI programming is nothing more than programming with some special types of input, and a few very strict rules for program output. When a user fills out a FORM (a collection of HTML tags that allow them to submit input) the server sends the form input To The Specified CGI Program, Which In Turn Parses The Entered Data And Uses It in a Specified Manner, And Returns Html with an aff....

When you choose a language for writing CGI scripts, you should consider this language should have the following option:

Processing text, string easy to access operating system environment variables with other software libraries

When You 'Ree Write CGI Scripts, Ensure That The Language You SELECT:

· Makes Text Manipulation Easy

IS ABLE TO INTERFACE WITHER SOFTWARE Utilities and Libraries

· Is Able to Access Your Operating System's Environment Variables

Perl ensures that all of the above options are required, making Perl to be the first choice for the CGI program language. If you want to write CGI scripts, I strongly recommend that you use Perl - you will find how easy it is. If you want to get more about CGI and how it works, you can find a detailed description of CGI in NCSA Site (you should know, this is a programmer site for experience with rich development experience).

. Perl satisfies all the above requirements, making it a very good language for CGI programming If you want to write your own CGI scripts, I'd suggest that you use Perl - you'll find that it will make your life a lot easier . ................................................................................................................................

About Larry Wall

Programmer, Linguist, Author, Born March 10, 1949 in Duncan, British Columbia, Canada, IS MOST WIDELY KNOWN for His Creation of The Perl Computer Language in 1987.

Programmer, language, author, born on March 10, 1949, was born: Duncan, Canada, is well known that it invented Perl computer language in 1987. Wall is the author of the rn Usenet software and the nearly universally used patch He has won the IOCCC twice and was the recipient of the first Free Software Foundations award for the Advancement of Free Software in 1998. Larry Wall wrote rn -. With a Programs for the USENET newsgroup: For software development, RN is a prototype called FREESOFTWARE or OPENSOURE model ---- Programmer in all localities collaborates through the network, by making everyone can get code to improve products . The Larry Wall also wrote a small program called "patch". Patch has a compressed new upgrade source code and can be applied to previous source code. Patch can improve the speed of the old code update, and even very smartly The previous source code has been made. Larry Wall has received two honors to IOCCC and the Free Software Issue.

Beyond his technical skills, Wall is known for his wit and often ironic sense of humor, which he displays in the comments to his source code or on Usenet for example, "We all agree on the necessity of compromise. We just can not agree on when it's necessary to compromise "). Larry Wall is a trained linguist, which helped him with his book writing, as well as with the design of Perl. He is the co-author of Programming Perl (often referred to as the Camel Book ), which is the definitive resource for Perl programmers. He has edited the Perl Cookbook. His books were published by O'Reilly .Wall continues to oversee further development of Perl and serves as the Benevolent Dictator for Life of the Perl project.

Larry Wall is the creator of Perl, and is also the author of other popular UNIX free software, including RN news readers and ubiquitous Patch programs. From the perspective of education, Larry is actually a linguist, a graduate of the University of California, Berkeley, and Los Angeles. In these years, he worked in Unisys, JPL, NetLabs, and Seagate, what to do from the discrete event simulator to the network management system, occasionally a spacecraft. It is in the period of Unisys work, in which Perl is born when he tried to use a 1200 baud's encrypted link with a 1200-PottNews, and a modified NetNews. Larry is currently working for O'Reilly. Larry Wall Personal Person: http://www.wall.org/~larry/

I have collected some articles about Larry Wall, very good: Legendary Programmer Larry Wall: Perl Larry Wall and Perl

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

New Post(0)