Confessions of a recovering Perl hacker

As many have found, the lure of the Perl is hard to resist.
304 readers like this.
Avoiding data disasters with Sanoid

Opensource.com

My name's MikeCamel, and I'm a Perl hacker.

There, I've said it. That's the first step.

My handle on IRC, Twitter and pretty much everywhere else in the world is "MikeCamel." This is because, back in the day, when there were no chat apps—no apps at all, in fact—I was in a technical "chatroom" and the name "Mike" had been taken. I looked around, and the first thing I noticed on my desk was the Camel Book, the O'Reilly Perl Bible.

I have the second edition now, but this was the first edition. Yesterday, I happened to pick up the second edition, the really thick one, to show someone on a video conference call, and it had a thin layer of dust on it. I was a little bit ashamed, but a little bit relieved as well.

For years, I was a sysadmin. Just bits and pieces, from time to time. Nothing serious, you understand—mainly my systems, my friends' systems. Sometimes I'd admin systems owned by other people—even at work. I always had it under control, and I was always able to step away. There were whole weeks—well days—when I didn't administer a system at all. With the exception of remote systems, which felt different, somehow less serious.

What pushed it over the edge, on reflection, was the Perl. This was the '90s—the 1990s, just to be clear—when Perl was young, and free, and didn't even pretend to be object-oriented. We all know it still isn't, but those youngsters—they like to pretend, and we old lags, well, we play along.

The thing about Perl is that it just starts small, with a regexp here, a text-file line counter there. Nothing that couldn't have been managed quite easily in Bash or Sed or Awk. But once you've written a couple of scripts, you're in—there's no going back. Long-term Perl users remember how we started, and we see the newbs going the same way.

I taught myself Perl in order to collate static web pages from five disparate FoxPro databases. I did it by starting at the beginning of the Camel Book and reading as much of it as I could before my brain started to hurt, then picking up a few pages back and carrying on. And then writing some Perl, which always failed, mainly because of lack of semicolons to start with, and then because I didn't really understand much of what I was doing. But I kept with it until I wasn't just writing scripts to collate databases, but scripts to load data into a single database and using CGI to serve pages in real time. My wife knew, and some of my colleagues knew, but I don't think they fully understood how deep I was in.

You know that Perl has you when you start looking for admin tasks to automate with it. Tasks that don't need automating and that would be much, much faster if you performed them by hand. When you start scouring the web for three- or four-character commands that, when executed, alphabetise, spell-check, and decrypt three separate files in parallel and output them to STDERR, ROT13ed.

I was lucky: I escaped in time. I always insisted on commenting my Perl. I never got to the very end of the Camel Book. Not in one reading, anyway. I never experimented with the darker side-effects; three or four separate operations per line was always enough for me. Over time, as my responsibilities moved more to programming, I cut back on the sysadmin tasks. Of course, that didn't stop the Perl use completely—it's amazing how often you can find an excuse to automate a task and how often Perl is the answer. But it reduced my Perl to manageable levels, levels that didn't affect my day-to-day functioning.

I'd like to pretend that I've stopped, but you never really give up on Perl, and it never gives up on you.
I'd like to pretend that I've stopped, but you never really give up on Perl, and it never gives up on you. My Camel Book (2nd ed.) is still around, even if it's a little dusty. I always check that the core modules are installed on any systems I run. And about five months ago, I found that my 10-year-old daughter had some mathematics homework that was susceptible to brute-forcing. Just a few lines. A couple of loops. No more than that. Nothing that I didn't feel went out of scope.

I discovered after she handed in the results that it hadn't produced the correct results, but I didn't mind. It was tight, it was elegant, it was beautiful. It was Perl. My Perl.

Tags
User profile image.
I've been in and around Open Source since around 1997, and have been running (GNU) Linux as my main desktop at home and work since then: not always easy...  I'm a security bod and architect, co-founder of the Enarx project, and am currently CEO of a start-up in the

20 Comments

"My name's MikeCamel, and I'm a Perl hacker."

You type that as if it were a Bad Thing. It is not. It means that you appreciate the elegance of a language that doesn't think you're an ignoramus and doesn't feel the need to nanny you, but does provide the tools to both Just Get Things Done and Do Things Safely.

You want to just parse a log looking for the stupid error - go ahead.

You want to build a system that has declared types for variables - go ahead.

One Swiss Army Chainsaw, as we say. No need for the cognitive dissidence of tool switching.

My name is Matthew Persico (PERSICOM on CPAN). I am a Perl Hacker. Boo-yah!

Matthew -

You're right, of course. I am proud, and I miss the days when I wrote some significant amounts of Perl. It's not the right tool for everything - or everybody - and I felt that my experiences might resonate with enough people to raise a wry smile.

Be Perl. Be Proud.

-Mike.

In reply to by Matthew Persico (not verified)

You don't mind that you got wrong results? That's not Perl's fault. I wouldn't call it tight, elegant, or beautiful. But I start with loose, ugly code that does it right and tighten it later.

However, if you need help you can always ask on Stackoverflow and the community will be there for you.

And, it's the Fourth Edition that's the thick one: almost twice as thick as the second. That's the one that could hold open a heavy door or break a toe. I compare the physicality of all four editions in 20 Years of Programming Perl.

Brian -

Of _course_ I minded about the correctness of the results. I'm using humour as an emotional crutch, mainly because I'm British. It's partly a lament that I've written so little Perl these days that I don't even write it well anymore. :-(

I know I could have asked others, but I wrote it in half an hour in a cafe with no Internet access!

I absolutely loved the article, and plan to point others at it. This is the sort of evidence-based writing of which we need more if we're to convince other people that Computer Science is, well, a science.

-Mike.

In reply to by brian d foy (not verified)

Even modern mental health care has great difficulty helping people achieve complete recovery from having programmed in Perl.

It's even worse than BASIC.

My experience with Perl was kind of the opposite - I looked into it, I tried to do something with it, and ended up recoiling in horror. I have been unable to touch it ever since. There must be something wrong with me.

Some would say that there's nothing wrong with you: it might be Perl that's at fault...

In reply to by KWL (not verified)

Do not engage in this fight alone. Join a local PHA group.

Sharing experiences and struggles in the anonimity of PHA groups
has helped quite some people who have fallen in the same trap.

The Infinite Steps Program (There's More Than One Way to Do It)
may help you recover in a very unstructured way.

Thank you. I feel that I've managed the first step: to admit that I have a problem.

In reply to by Carol Fenijn (not verified)

This does sound serious: "Be Perl. Be Proud." along with producing incorrect code. Correctness is number 0, completeness number 1 and efficiency number N, the value of N depending on the task at hand.

In reply to by MikeCamel

I'm not suggesting that it was incorrect: just that it didn't provide the results that my daughter's teacher expected.

OK: it was wrong.

In reply to by CF

As long as you do not tell your daughter that her teacher should have provided a more appropriate assignment that did match your code your condition is not all that bad after all. There is hope for recovery for you as well.

In reply to by MikeCamel

You're lucky. When I started hacking Perl, we didn't even *have* books. :)

Being able to ride on llama's and camels has been a great experience throughout the years. No wonder so many people ended up joining PHA in the end.

In reply to by Randal L. Schwartz (not verified)

I absolutely love Perl and always will. I cannot stop writing in it because of its power and elegance - it is so much more concise than all those bloated, dumbed-down programming languages out there.

ScottyProg - go for it! I'm still very fond of Perl, which has a real elegance when written well.

Oh thank the Lord, there are others like me can't keep away from Perl. Although, I am a unskilled pretender ex-operator - I still reach out for Perl to do my number mangling for taxes and gambl^H^H^H^H^H speculating the markets.

Cheers TIMTOWTDI

Creative Commons LicenseThis work is licensed under a Creative Commons Attribution-Share Alike 4.0 International License.