top | item 6933861

Perl is 26 Today

207 points| Mithaldu | 12 years ago |modernperlbooks.com | reply

189 comments

order
[+] arc_of_descent|12 years ago|reply
Been using Perl for almost 10 years now. I've used Perl for almost everything. Web development using CGI::Application, developing my own web framework, console apps (using the ncurses library), POE (Perl Object Environment), Web socket stuff and more.

My main job currently involves maintaining and developing a huge code base in Perl including three websites (soon to expand to much more). Perl just works. I thoroughly enjoy coding in it. I've not spent too much time optimizing and testing code though. mod_perl is pretty fast in itself (using Apache).

That being said Perl certainly lacks the in-built features which would make meta programming a quick and easy job. Yes, I still have to start using Moose. Perhaps in 2014!

Happy 26th Birthday Perl! Without you, I wouldn't have a job!

[+] joel_perl_prog|12 years ago|reply
Stevan Little, the author of Moose, is working on updating the Perl5 core to have a Moose-inspired Meta Object Protocol, called p5-mop.

Video: https://www.youtube.com/watch?v=4YZNwO-uCVg Github: https://github.com/stevan/p5-mop-redux/

I'm personally interested to see how this develops.

As to my own Perl story, I used it exclusively in my first (non-student) programming job, back in the summer of 2000. I built an e-commerce website, CGI, with a cookie-based shopping cart. All from scratch, no frameworks, etc. I don't even know if there were any back then.

Fast forward to the year 2011. I started using Perl again, and loving it. Still use Perl every day. A fluid mixture of procedural, functional and object-oriented code. I really enjoy the language.

[+] csmuk|12 years ago|reply
I wouldn't have had a job between 2003-2004 which was untangling Perl and rewriting it in C# :)
[+] melling|12 years ago|reply
Perl is definitely a cool language. I've used it for 15 years. However, I feel like it made a wrong turn somewhere and Ruby and Python both passed it. I've done a a little Ruby and some Python. They've never grabbed me like Perl, but practically speaking I don't think there are enough reasons to choose the 3rd most popular scripting language. (Btw, I've listened to the CPAN argument for 10 years. It's not enough)
[+] ChuckMcM|12 years ago|reply
So when I went to Google I learned Python. I enjoyed the language and used it a lot, it has a solid support base and pretty much anything you wanted to do you could import a module to do it. When I went to Blekko they were a perl shop, which was a bit intimidating at first, but after programming in it for nearly 4 years now I find I can get from concept to first test faster in Perl than I could in Python. And I hadn't realized how much the Python indentation stuff bugged me until I got back into a scripting language with braces.

At the end of the day I find I prefer perl for quick things, and Python for multithreaded things.

[+] per06a2|12 years ago|reply
I can't stand perl's philosophy: http://en.wikipedia.org/wiki/There%27s_more_than_one_way_to_...

Contrast with Python's philosophy: https://wiki.python.org/moin/TOOWTDI

Python's philosophy may be limiting for some people, but I'd rather have code that I have a decent chance of reading and understanding the run-time behavior of than a language that encourages extreme personalization.

The whole parsing thing doesn't help either: http://www.jeffreykegler.com/Home/perl-and-undecidability

[+] d23|12 years ago|reply
Could you explain what features or aspects made it quicker to get up and running with? I love Python and have never worked with a language that I felt let me get features out so quickly. Do you feel you've sacrificed readability as well? I've heard Perl is notorious for having a million ways to do everything, making reading it hard.
[+] adharmad|12 years ago|reply
Can you please expand a bit on "Python for multithreaded things"? My understanding was that Python interpreter has a GIL, which limits the concurrency and performance.
[+] frou_dh|12 years ago|reply
Sorry for being petty, but what's this creeping pattern of folk leading with "So"? It reads poorly and sounds even worse.
[+] agentultra|12 years ago|reply
Yay Perl!

It was my first exposure to dynamic programming languages (unless you consider BASIC one). I started out on BASIC on an Amiga 500 then C on my first DOS 386 computer (I just wanted to learn to make games). I came across Perl in my final year of high-school when at a co-op placement with a local web development shop. The school taught Pascal and a little-known language called, Turing. Scalars were super-cool by that point.

It's amazing to see how far things have come and that Perl continues to get better despite the downward trend in its popularity in recent years.

Here's to another 26! :)

[+] athenot|12 years ago|reply
Two main aspects of Perl that have always drawn me time and time again back to it are (1) the get-it-done mentality (there's more than one way to do it, and what really matters is completing the job) and (2) the huge repository of modules that is CPAN.

Evaluating other environments along those lines yielded interesting frustrations. In my opinion, the real contender is node.js, thanks to its minimalist approach on many things, and NPM.

Note: I'll admit that Node forces you to be as async as possible, but it's for a good cause so I can turn a blind eye on it. :)

[+] arjn|12 years ago|reply
Good old perl. Complicated, funny, odd and very useful. I've been using it regularly for the last 6 years now.
[+] nly|12 years ago|reply
That moment when you realise you're older than Perl, and many of the same adjectives apply to the both to you.
[+] MichaelMoser123|12 years ago|reply
Yes! Many thanks to Larry Wall for having invented a tool that stands the test of time; I am wishing him well, I read he had health related problems in recent years;
[+] AugieDB|12 years ago|reply
Was introduced to Perl in a programming languages course in college in 1996/1997. Brought it to my first job, where it gained fame there for being the language that took a 12 hour process and ran it in less than a minute. (They had originally been trying to parse a huge log file with Visual Basic, I believe it was. Perl was made for, well, extraction and reporting...)

Been programming in it full time ever since.

Thanks, Larry Wall, Randall Schwartz, Brian Foy, Nat Torkington, Tom Christiansen, Damian Conway, etc. etc.

Count me in as another person introduced to O'Reilly via "Programming Perl." Was "Perl Best Practices" the first such "Best Practices" book?

[+] adharmad|12 years ago|reply
One of my favorite Perl books, albeit a bit lesser-known is "Higher Order Perl" by Mark Jason Dominus.
[+] pasbesoin|12 years ago|reply
Adding a bit of praise for "Programming Perl". (As well as for some of the other books by the fine people you've listed.)

"Programming Perl" is not just (very) informative, it is also engagingly, even entertainingly informative.

(Proof of this is left as an exercise for the reader... ;-)

[+] swansw|12 years ago|reply
For those wondering about startups using Perl for a large part of their codebase, DuckDuckGo is certainly one. There maybe others too but mostly it's for server side scripting.
[+] taude|12 years ago|reply
Favorite Perl story (despite it being the first language I used to program the web back in college).

I once had to work on a an ASP (MSFT Active Server Pages circa 2001?) website that was written with ActivePerl [1]. Their technologist chose it, then left the company, and they had a hard time finding someone to work on it.

Also, the Programming Perl book was my first O'Reily book that I read/used, checkout out from campus library.

Ahh...memories.

[1] http://www.activestate.com/activeperl

[+] Surio|12 years ago|reply
I am a Perl user and I do like it very much (warts and all). This article reminded me of another self-deprecatory Perl article: http://ebb.org/bkuhn/blog/2012/12/18/perl-cobol.html

And yes, as the article says, Here's to 26 more! :-)

[+] lmm|12 years ago|reply
That's an interesting article but seems to be missing the actual why of it. He still likes perl because... culture? Some people are still writing software in perl or cobol, sure - and some of that is good software that solves real problems. But the reason we think of the average programmer in one of these obsolete languages as "some sort of second-class technology citizen" is that, well, they are. Compared to the rest of us they spend more time working around language deficiencies, inadequate tooling and all the rest of it, and less time making interesting things.

Right now I'm a huge Scala fan. I've had that experience of feeling that I never want to program in any other language again (and every other language I've gone to, even those I used to like, feels clumsy and tedious by comparison). But I hope that in 25 years' time I'll have moved on to something even better. Language design isn't done, and languages are getting better all the time.

[+] pera|12 years ago|reply
I love Perl, it's the only language (afaik) that let you do the same thing in a hundred different ways, and this provides infinite fun when you program since you can discover or think something new every single time. And that's why we have perl poetry, perl golf, and fantastic obfuscated codes. Happy 26!

   no less can I say;
   require strict, close attention
   while you ... write haiku
[+] onion2k|12 years ago|reply
I used to be a Perl developer a very long time ago. Writing CGI based web apps was fun, and felt much 'tighter' than today's world of PHP, Ruby, JS, etc. That said though, I don't miss it. :)

Perhaps my favourite memory of the Perl scene was the announcement of Parrot - an April Fools joke that detailed a project to built a bridge between Perl and Python - that then got built. Brilliant.

[+] AlexanderDhoore|12 years ago|reply
I'm a relatively new programmer. Been programming for around 4 years. I tried Perl, but felt like the world had moved on, so I never really committed to it.

With PHP, Python, Ruby and Javascript... space seems tight for another scripting language. Languages like Lua have something special. What's special about Perl?

Edit: I don't want to be hateful. The more the merrier obviously.

[+] nailer|12 years ago|reply
Perl's older than most of those.

The original killer feature of Perl was regexs - these existed before, but Perl's implementation destroyed all others, and 'PCRE' (Perl compatible regular expressions) became the default - most modern languages use PCREs for their regexs.

There was some bad stuff that happened with this too - people used regexs for ghetto, half-assed versions of tree structures like HTML and XML - but for the task of chewing through Unix config files, up until around 2005 Perl was unbeatable because of the awesome regex support (and because it's history meant, at the time, perl was installed on all Unix boxes).

[+] garrettdreyfus|12 years ago|reply
I first looked at perl last week and also shared your sentiment. At first when I saw perl I was aghast. The "ugly" $%@ syntax seemed pointless and unreadable. Then I decided to take a look at a non-beginner book, Intermediate Perl http://it-ebooks.info/book/879/. I was surprised and excited 50 pages in because I realized that Perl had a wealth of tricks , and that that "ugly" $%@ syntax actually had some cool repercussions. The other thing I noticed was that Perl's flexibility led to the ability to write code that was closer to how I would structure the command grammatically, for instance, "print x if x>5." I'm looking forward to learning perl further.
[+] collyw|12 years ago|reply
I moved from Perl to Python 3 years ago.

Its true. Perl feels like a very powerful base language, moving to Python felt like you were taking a bit away (I know in reality you can probably achieve much the same things). Python on the other hand doesn't require you to implement your own basic functions (max, min , trim / strip ) as they are included already. Python stops me from shooting myself in the foot as often, by not allowing me to do stuff that is too clever too early.

I do miss being able to reference / deference variables explicitly though. Other great things are, CPAN, regular expression support (that never feels as nice in Python), one liners for doing stuff quickly on the command line. I even quite like the sigils, as an easy way to recognize the types of variable you are dealing with (though it is confusing at first). Working with strings feels a lot more natural in Perl than Python.

[+] petercooper|12 years ago|reply
Perl was my #1 language 1996-2004 and my answer for the period would be.. CPAN. It's easy to find great libraries for almost any language with traction nowadays, but back in, say, 2000, library availability and packaging was piss poor in languages like Python or Ruby. CPAN was full of great stuff, all reasonably well documented, and, the kicker, a lot of it had tests too.
[+] ef47d35620c1|12 years ago|reply
Old Unix sys admins made Perl special. Before Perl, they had to chain a bunch of sed, awk, grep, etc commands together or try to solve their problem in C. Both approaches were doable, but neither were ideal for the task. Perl was perfect for Unix scripting and sys admin tasks. From there, the rest is history.
[+] DougWebb|12 years ago|reply
With PHP, Python, Ruby and Javascript... space seems tight for another scripting language.

That's an ironic statement, since Perl came first and was absolutely dominant in the domains which PHP, Python, Ruby, and Javascript now occupy. When they were young, it would have been reasonable to say that space seems tight for another scripting language because we had Perl.

Languages like Lua have something special. What's special about Perl?

What's special about Lua? That's a four-word question that could require a huge response. Lua's a nice little embeddable scripting language, but that's a niche that Perl has occupied too. It's got fantastic support for both being embedded (callable from other languages) and embedding (able to call other languages). You might say that Lua's better because it's smaller and cleaner and simpler, but that's only true until you run into Lua not being powerful enough for something you want to do. If you used Perl as your embedded scripting language instead, you probably wouldn't have that problem. (Other problems, maybe, but not a lack of power.)

[+] virtualsue|12 years ago|reply
There is, in fact, all the space in the world.
[+] cliveholloway|12 years ago|reply
Favorite Perl snippet (from Joseph Hall's EPP book)

    [$x => $y]->[$x <= $y]
Holy shit - just realized I first touched Perl 15 years ago!
[+] bonemachine|12 years ago|reply
Egads. If you have time to even think about writing anything other than

    $x > $y ? $x : $y
in this use case, then you have way too much time on your hands.
[+] virtualsue|12 years ago|reply
Many happy returns of the day. Good old Perl. I'd be happy to use other languages, but I tend to get plenty of offers to continue using this one. :-)
[+] rikacomet|12 years ago|reply
I recently turned into a Perl user. Though I must say, documentation about Perl with CGI, and pre-made scripts are a let down. I browsed many O-Reilly books on Perl, CGI is one of the least explanative topics. Some modules have very obscure explanation on CPAN, I don't mean any offense.

If not for Perl Monks, my enthusiasm might have been lost midway.

[+] collyw|12 years ago|reply
As a Perl to Python convert, I miss Perl Monks. Google for anything Python / Django related, and you end up on Stack Overflow. But the attitude of many of the moderators is over the top, and they are definitely loosing something by not encouraging discussions like they do on Perl Monks. You will get your code to work, but you will be far less likely to come out with greater insight or understanding.
[+] mxey|12 years ago|reply
CGI is not the way to go today. If you want to build web pages with Perl, check out http://mojolicio.us
[+] Mithaldu|12 years ago|reply
If you're looking for learning and reading material on Perl, http://perl-tutorials.org is the only way to go, exactly because Perl is so old.
[+] berntb|12 years ago|reply
"CGI Programming with Perl, 2nd Edition" is from the year 2000, otherwise I'd joke about 20th century called and want their library back. :-)

If you can't go to the modern frameworks, I quite like Dancer myself, you can get an ebook from O'Reilly (or used).

[+] arca_vorago|12 years ago|reply
My favorite perl story: Had been working on parsing through huge flat text files with it, had over 40 lines going and just could not get it to work correctly. I took a step back, rethought what I was trying to do, and wrote a one liner awk that just worked.

Side note: I have noticed that in bioinformatics, perl is largely being replaced with python in tool usage.

[+] Mithaldu|12 years ago|reply
> I have noticed that in bioinformatics, perl is largely being replaced with python in tool usage.

Which has honestly little to do with the language and more with the fact that the bioinformatics-related Perl books are the worst programming teaching books i have ever seen. (Honestly, a lot of the flak on perl goes back to old and outdated books.)

[+] sanskritabelt|12 years ago|reply
I haven't been a regular perl programmer for coming up on 10 years now (switched to python), but I still miss the easy regexes, and I'll pull it out when I have to do awk/sed like things.
[+] majidazimi|12 years ago|reply
hahaha. Perl is 2 years older than me.
[+] ChuckMcM|12 years ago|reply
You don't even want to know how old FORTRAN is :-)
[+] amerika_blog|12 years ago|reply
Perl is the ultimate hacker's language.

It was for the 90s and 00s what Microsoft BASIC was to the 1980s.

However, I think it's also coming back. Most of the "inefficiencies" it got tagged with were relics of the server model at the time, like CGI.

Now many are seeing that mastery of a general-purpose language is better than knowledge of specialized methods in a specialized language.

The first is flexible; the latter is not.

[+] untothebreach|12 years ago|reply
I also think that things like Modern Perl[1] are helping to move the community away from the "line-noise" style of Perl that it was (in)famous for back in the day.

1: http://modernperlbooks.com