I am moving into a project which has lots of Perl coding in it. Can somebody suggest me a good book which I can use to learn Perl? Online tutorials would also be helpful.
I'd say that my first choice, if you've never touched Perl before, will be O'Reilly's Learning Perl by Randal Schwartz, Tom Phoenix, and brian d foy. My second one, which is a bit higher, would be Programming Perl by Larry Wall himself. One more, that is not, a book you'll really read like a novel, will be the Perl Cookbook which will give you a ton of little ways to do things. That's for the basics, you'll find a lot of other topics on the Perl's section of O'Reilly's collection.
Now, it's not a list of books you should buy, everyone has different needs and learn differently, but if you have a book shop nearby and they have those books, you should definitively have a look at them and see if they fit your needs. (Which I'm certain they will.)
Maybe http://books.perl.org/ would be the best answer. I heard specially good reviews for:
Learning Perl (5th edition); Randal Schwartz, Tom Phoenix, and brian d foy; O'Reilly Media
I found "Programming Perl" very helpful. "Learning Perl" is more directed to people who are new to programming.
Reading code examples is an additional way to gain some insides into the language. The "Perl Cookbook" has commented examples.
If you're doing any OO Perl, another one to read is Damien Conway's Object Oriented Perl.
Once you've read that and understood it, go look at the Moose documentation, because that's what you should be using for OO Perl these days. (There are cookbook examples in the Moose documentation.)
I learned Perl exclusively through reading the documentation (yes, man perl
, although it is available online too) which is very well written in my opinion and contains several tutorials for different aspects. Then, getting familiar with CPAN was another important step.
I would suggest adding this one to your Perl library, it is the one that has been most valuable to me, and I own a handful:
And don't forget Higher-Order Perl by Mark Jason Dominus.... a classic
/I3az/
While there are a plethora of books dedicated to the topic of Perl and I could even name my own favorites (Learning Perl, the Camel book, etc), there is no replacement for experience. There is no better way to learn than to write code. You will learn the syntax and its ins an outs a lot better if you actually do it.
Also, keep a tab in your browser open to perldoc as it is an invaluable resource.
Regards,
Jeff
Another vote for the camel. I have it right beside me and it's very well detailed. The newest version is almost completely rewritten and covers the language pretty thoroughly.
If you run the command perldoc perl you will get a list of Perl documentation pages and a suggested order for reading them. I recommend reading through as much of this documentation as possible over any book. In my early days as a Perl programmer I made myself read through one of these documents every work day after lunch. That's what truly transformed me into a Perl programmer.
I'd say get yourself a jumpstart from a book or tutorial (if you're not already familiar with basic Perl syntax), and then get into that documentation. Afterward you'll be better able to evaluate books yourself if you want to go more advanced.
As far as books go I have a special fondness for the out of print "Pink Camel," the first edition of Programming Perl. It teaches Perl in a way that would work wonderfully for people who don't even understand programming. It's also hysterical. However, a lot of what it says is relevant to old, old Perl; best practices today have moved far beyond what is in that book, and it would actually teach a lot of bad habits. The 2nd edition of Programming Perl was quite different from the first, and I think the void was filled by the Learning Perl book.
I think it's time chromatic's Modern Perl was mentioned. It's not in print as of writing, but you can download the content from his github. From a brief read, it's a Perl-from-scratch book, but it teaches best practices from the start, rather than teaching you the whole syntax and leaving you to learn which bits are not worth using later as the Camel does. It also covers modern innovations such as Moose in some detail.