Give Perl a Chance
I had always wanted to learn Perl. I had a few brief encounters with it, using my php knowledge to drive my Perl programming in a very php styled way. However, I knew Perl could do so much more. I had nearly one week free and decided to give Perl a serious chance. I happened upon a great book available free from perl.org and was more than pleased.
Beginning Perl is available in PDF form for free from the Perl website. The book gives a very high quality, engaging, and through description of Perl. If you have been interested in learning Perl give this book a go and I assure you that you will get hooked into how the author daftly portrays subjects and concepts with excellent concise code examples and explanations. This is the kind of programming book that every programmer searches for. It is so engaging you will find that you will go through a chapter a day. The author has a gift for breaking subjects down to simple concepts, which is after all the real core of programming.
Make sure that you print out the appendixes. Read them over if you really want to grasp the full power of Perl and its endless options, special variables, and famous regular expressions. The actual chapter on regular expressions even tipped me off to certain tricks that I was even unaware of (lookaheads and lookbehinds). However if you are looking for a more general explanation of regular expressions I still recommend the links that I posted at the bottom of this article.
Many have considered Perl to be a confusing language. The book’s introduction declares that it means to dispel that rumor. Here is the direct quote from the introduction, hopefully it will motivate some of you to grab the PDFs and take a look:
However, since Perl is so easy to learn and to use, especially for quick little administrative tasks, ‘real’ Perl users tend to write programs for small, specific jobs. In these cases, the code is meant to have a short lifespan and is for the programmer’s eyes only. The problem is, these programs may live a little longer than the programmer expects and be seen by other eyes too. The result is a cryptic one-liner that is incomprehensible to everyone but the original programmer. Because of the proliferation of these rather concise and confusing programs, Perl has developed a reputation for being arcane and unintelligible - one that I hope we can dispel during the course of this book.
I will admit that the book is flawless in its persistence of providing full quality Perl scripts. I always strive to optimize my code, normally trying to increase efficiency and readability in my algorithms. However, Perl’s incredible flexibility does allow programmers to do some rather unbelievable tasks in well under 100 bytes (1 byte = 1 character). I will soon write an article about the dark side of every programmer… code golfing.
