Adventures in Perl
(Originally published on samirparikh.com.)
Just over one year ago, I wrote about how I had become enchanted with the D programming language as part of my journey in exploring new programming languages. I still really like D for all of the reasons I wrote about, but as I alluded to in the conclusion of that piece, I fully expected to “get distracted by the next new shiny thing that comes along.” Turns out that the next new shiny thing happens to be … Perl!
That’s right: a language that Larry Wall first developed back in 1987 happens to have caught my fancy and I’m as surprised as anyone.
When I first started learning Python over ten years ago, I would come across snippets of Perl in solutions submitted to things like Project Euler or in various forum threads. Perl programs had the most opaque and impenetrable syntax I had ever seen, filled with @ after & followed by more $ symbols than I could count. But the further I got into the bioinformatics problems on the Rosalind site, the more I started to understand the power, brevity and design of Perl. It was refreshing to see that regular expressions were treated as a first class citizen and that there were similarities to how Perl and Bash scripts were written (which, to some, could be a disadvantage!) And the more I read about it, the more I began to appreciate its rich heritage and its history alongside the development of Unix.
I picked up a copy of the seventh edition of “Learning Perl” and started educating myself on the language. In order to get some practice and apply what I’ve been learning, I’m redoing some of the Rosalind problems I had originally done in D as well as trying to participate in Mohammad Anwar’s Perl Weekly Challenge.
I’ll do my best to update this site on whatever I learn but if the past six months or so are any indication, don’t hold your breath. And who knows, by the time I find the time to publish a new post, I may be onto something else!
Welcome to the site!
Sometimes if you want to eke out the last drop of performance from Perl, it can mean sacrificing readability, so looking at code from contests that reward performance, brevity, etc can give a bad impression of Perl syntax. It is certainly possible to write readable, maintainable Perl code though.
If you haven't already discovered it, PerlMonks is one of the main community sites for Perl, so I'd recommend having an account there. Good if you get stuck with anything and need help, or want to find better ways of doing something.
Welcome back! Perl, tools for Perl, and the Perl community have become even better over the last 10 years. Please share whatever surprising chocolates (or disappointments) you encounter. Your perspective will be valuable.
Hi Toby!
Thank you for your comments and advice! I am familiar with PerlMonks (many of the answers to the questions I was looking for could be found there) and I have signed up for an account. You can find me there as Leudwinus.
I've also been following some of the mailing lists (comp.lang.perl.misc and perl.beginners) as well. Like D, Perl seems to have a great community.
Samir
Hi Dave!
I will definitely do my best to share what I learn and look forward to seeing what others find too.
Samir
Thank you for discovering the benefits of Perl, including its similarity to Unix / Linux shells and the built-in regular expressions in programming languages.
I'm Yuki Kimoto.
I'm one of the Perl users working on blogs.perl.org.
A website often serves as the first point of contact between a business and its potential customers fremont web design A professionally developed website with a clear brand message helps establish credibility and trust. It reflects the values and quality of a business, influencing how customers perceive the brand.