I love Perl. Having used a lot of programming languages, I find Perl to be the best tool whenever I need to parse yet-another-ugly-file, grab some data from the web page, convert a bunch of files between markups, quickly hack a HTML report based on database data, or script around some text based protocol - and more. I also tend to write Perl scripts instead of shell scripts, they are more powerful and less error-prone.
The Perl strengths lie mainly in very well integrated regular expression support (resulting in compact and easy to write text parsing code), support for dynamically created complicated data structures (a list of dictionaries containing field id and items, where items is a list of numbers... can be trivially created and operated) and CPAN - giantic library of useful libraries.
As I plan to refer to Perl in some future articles, I decided to save here a few valuable pointers:
-
the best book to learn Perl from scratch:
Learning Perl - concise, well written, and containing many useful examples
-
awesome set of real-life examples and solutions: Perl Cookbook
Those two books should be sufficient for most people. Some possible extras:
Continue reading "Perl" »