Reprinted from: http://club.topsage.com/thread-464914-1-3.html
Learning Perl
Perl is a very useful language and can be used to do many things. However, it is only a language that has mastered Perl. You only have mastered a small piece of knowledge in the computer field. Before learning Perl, clarify your learning objectives and use the correct learning methods and resources.
(1) learning objectives
What is your objective of learning Perl? Is Perl enough for your purpose? Let me help you analyze it.
1. I want to be a system administrator and use Perl for SA work.
Good idea. Excellent SA and Perl capabilities are essential. Perl's flexible syntax, powerful regular expressions, good Shell Combination capabilities, and many CPAN modules will make your sa work as much as possible, reducing the workload. However, the essence of SA work lies in system. It may be worth more time to maintain the stability and security of the system. You need to learn about operating OS such as UNIX and Linux, application configurations such as Apache, Sendmail, bind, squid, and MySQL, and shell scripts such as awk and sed. It is worth a lot of effort to get familiar with each of these items.
2. I want to become a web programmer and use Perl for web development.
Good idea. Please study Perl. Do not be confused by some so-called popular concepts, or worry about when CGI will become obsolete. At least from an even point of view, one day of the Web, CGI will always be useful. I will not list large foreign sites that use CGI driver, because there are too many sites. The two largest email services providers in China, Sina and Netease, whose webmail is implemented using CGI, And they undertake tens of millions of accesses every day.
However, you should also realize that learning Perl is not enough for Web develop. You need to learn the HTTP protocol, HTML, XML, JavaScript and other Web rendering languages, mod_cgi, mod_perl and other Apache modules, and SQL statements and databases. I even want to learn about PhP, Java, and. NET technologies. After all, these three technologies are very popular. You don't have to love them, but it is advantageous to get a job in China if you master them. I seldom heard of Perl programmer, a single recruit for web development, which is different from that in foreign countries. Similarly, the various aspects mentioned above also require you to spend a lot of time learning, not just learning Perl well.
3. I want to be an application programmer and use Perl in applications development
If so, I suggest you learn C/C ++ first. After all, it is the foundation of computer language. Although some simple applications can be written in Perl, although Mr. lincoin Stein said that the Web server developed by him is faster than Apache, but to productize the program developed by Perl, there are still many problems-after all, it is just an explanatory script, and many underlying things are still based on C. In order to pursue high performance and productization, why not use C?
Of course, if you only write applications for yourself or your company, Perl is understandable. Even if our company has a log department, our daily job is to analyze massive data, which is sufficient to use Perl. Processing text. Perl is better than any other language. However, even in this case, the Department still requires you to C/C ++.
4. I want to be a Perl hacker and contribute modules to CPAN.
I hope you can stick to it. I can't reach this level, so it's hard to say anything. In this development, I hope you can fully understand OOP and the concepts of reference transfer and symbol table. Otherwise, you will not be able to write modules.
(2) learning methods
If you do not have a teacher (as far as I know, there are very few universities/colleges in China that offer Perl courses), the only learning method is to read more books and write more code.
1. Do you want to read more books or read the code of others?
Of course, it is the former. Only when you understand the principles can you use them flexibly, Write clear code, and form your own code style ).
Looking at others' codes without having to focus on basic knowledge will confuse you. In this way, your knowledge will be scattered and you will not be able to build your own knowledge system.
Of course, reading other people's Code while reading a book is also a good way to learn. But remember, reading others' Code helps you understand the basic knowledge in books.
2. After reading the Basic Books, I want to read "Perl advanced programming" and "Perl technology insider"
Recently, many such topics have been seen in Cu forum, and faint occurs when you hear it. Please make sure that you fully understand the basic knowledge, and then read those books. Some people once asked me about Perl's advanced data structure. After a chat, I found that he was not very familiar with Perl's basic reference. What else can I talk about? How many people are unclear about the difference between $ VaR and ($ var? How many people do not understand the differences between $ {$ hash {key} and $ hash {key? Never be too impatient. Please step by step. Even the teacher is a little famous in the Perl field. He said it took three years to fully master Perl. Read more books and do more work.
(3) Learning Resources
I think all the three books I have read are very good. They are "Learning Perl", "programming Perl", "Network Programming with Perl", and another one seems to be "cgi ".
Programming with Perl ", I won't mention it if I have not read it carefully. The first two were published by oreilly, And the alias camel book (camel book) is a classic book for getting started and improving Perl. 3rd is a classic masterpiece of Mr. lincoin Stein. He is also a developer of mod_cgi, and his superb technology has benefited a lifetime. These three books all seem to have a Chinese version. Go to the bookstore to see if you can buy them. If you have no problem reading English, I suggest you read the original version.
You can also benefit from subscribing to the Perl mailing list, which lists all well-known Perl mailing lists:
Http://lists.cpan.org/
Beginners and beginners-cgi may be useful to you. Modperl-user discusses mod_perl.
Site:
Http://learn.perl.org/this site is prepared for learning Perl's people
Http://perl.apache.org/docs/ here has mod_perl complete docs