In Today’s Post
I provide a simple template I use to start every command-line utility I write in Perl. We’ll also make command-line option parsing easy using Getopt::Long, as well as make encapsulated documentation using POD.
Perl, the Swiss Army Chainsaw
Perl is an excellent language for system scripting. There are those who criticize Perl for being “syntactically excessive.” However, as languages evolve expressive power they often become more complicated. Remaining backward compatible requires carrying around a certain amount of syntactic baggage.
I’m pragmatic in that I’d choose a language that was powerful with a few eccentricities over one that was perfect and less useful, or one that had stopped evolving. Languages are a living thing – they need to adapt to changes in the environment or they die.
Perl will always be alive and well because it’s just too damn useful. Larry Wall, the creator of Perl, has described his creation variously as “duct tape for the Web” and a “Swiss Army chainsaw”. Perl’s hallmark is flexibility, which is just what’s required to glue things together that weren’t necessarily designed to be glued together.
In a future post I’ll show you a style of Perl programming that works well for me and provides just the right amount of OOP without going overboard. This is actually simpler to do than you might think.
Posted by rogerbush