You Can Cuss in Perl

Question: How would you explain what Perl is to a non-programmer?

Larry Wall: Well, people have ideas of what programming is like from the movies and such, but it's not really much like that.  Perl is what we call a scripting language.  It's for doing ad hoc things and just one-off things that you really wouldn't almost think of as being programming problems.  It's a language that is kind of like, you might think of writing a, you know, a ransom note and you're going to grab a newspaper and clip it into little pieces and so you want to find the right text really quickly and then you want to have some way of gluing it all together in the right order and that's kind of what a scripting language is good at, it's good at taking text and gluing it together.

But more than that, I mean, there's many scripting languages in the world, Perl is a little bit special because it is based more on some ideas from the way natural languages work.  My training was in linguistics, as well as computer science, so I've tried to make a language that works on a deep level, like human languages work.  You don't have to know the whole language to use it usefully, you can do baby talk, you can do grown up talk, you can cuss in it, you can write poetry, you can be a playwright, is sort of the idea.

How you use the language is really based on things that are external to the language itself.  So many computer languages try to force you into one way of thinking and Perl is very much the opposite of that approach.  It's kind of like a, well, sometimes Perl has been called the Swiss army chainsaw of the internet, but it's more like a Swiss army machine shop.  It really gives you a lot of tools, some of which are dangerous, but it lets you get your job done very quickly.

Question: How is Perl a “post-modern language”?

Larry Wall:  Well, the way I think of post-modernism, there's, post-modernism, of course, is about having many different views of something; it's about, you know, some people think of it as tearing down the power structures.  But in my experience, the post-modern movement has mostly been about not getting hung up on one particular idea or way of doing things, like modernism tends to do, and instead, sort of picking and choosing from different historical eras—I'm thinking more of architecture, where you can see different architectural features that the architect has used, just because they think they're cool and they can combine, you know, classical and romantic and baroque even, different ideas, and even modern, sure.  But you pick things because they're cool and because they'll be useful, not because somebody says this is the only way to do things.

And so Perl is very similar in the way it has collected features from other languages, things that seem to be distinct ways of doing things and finding a way of meshing those in a pleasing fashion—the same way a poet might take words that are very different from each other and mesh them into a coherent poem. Perl, in that sense, is very, very much, it doesn't have an agenda and it really is not trying to tell you how you're supposed to do your job, it just tries to get out of your way as much as possible. 

Question: Is Perl a good first language to learn for aspiring programmers?

Larry Wall:  In a sense, it's a good first language.  I've known people who learned it as a first language successfully, but that's not its primary purpose.  There are languages that are designed with the purpose of being a good first language, but they tend to run out of steam about the time your programs get interesting.  I think of Perl more as a last language that you would want to learn, that while Perl is like a human language and that you can start with baby talk and you're not expected to, you know, we don't expect a 50-year-old and a 5-year-old to speak with the same diction.  That's fine.  But we expect that when you need to know something, you can learn a new thing and the resources will be there for you to learn as you go.  So, it can be learned as a first language, but we really concentrate on having an expressive language, not an easy-to-learn language.  And sometimes an expressive language is a little harder to learn, but we think it's worth it. 

Perl developer Larry Wall says that, like a human language, you can use Perl in many ways—for baby talk, grownup talk, writing poetry or plays, and even cussing.

LinkedIn meets Tinder in this mindful networking app

Swipe right to make the connections that could change your career.

Getty Images
Swipe right. Match. Meet over coffee or set up a call.

No, we aren't talking about Tinder. Introducing Shapr, a free app that helps people with synergistic professional goals and skill sets easily meet and collaborate.

Keep reading Show less

Space toilets: How astronauts boldly go where few have gone before

A NASA astronomer explains how astronauts dispose of their, uh, dark matter.

  • When nature calls in micro-gravity, astronauts must answer. Space agencies have developed suction-based toilets – with a camera built in to ensure all the waste is contained before "flushing".
  • Yes, there have been floaters in space. The early days of space exploration were a learning curve!
  • Amazingly, you don't need gravity to digest food. Peristalsis, the process by which your throat and intestines squeeze themselves, actually moves food and water through your digestive system without gravity at all.
Keep reading Show less

A world map of Virgin Mary apparitions

She met mere mortals with and without the Vatican's approval.

Strange Maps
  • For centuries, the Virgin Mary has appeared to the faithful, requesting devotion and promising comfort.
  • These maps show the geography of Marian apparitions – the handful approved by the Vatican, and many others.
  • Historically, Europe is where most apparitions have been reported, but the U.S. is pretty fertile ground too.
Keep reading Show less

Can the keto diet help treat depression? Here’s what the science says so far

A growing body of research shows promising signs that the keto diet might be able to improve mental health.

Public Domain
Mind & Brain
  • The keto diet is known to be an effective tool for weight loss, however its effects on mental health remain largely unclear.
  • Recent studies suggests that the keto diet might be an effective tool for treating depression, and clearing up so-called "brain fog," though scientists caution more research is necessary before it can be recommended as a treatment.
  • Any experiments with the keto diet are best done in conjunction with a doctor, considering some people face problems when transitioning to the low-carb diet.
Keep reading Show less