Perl is a general purpose programming language so there’s a lot of stuff that you can do with it. It’s used in all sorts of application, projects and web stuff. Perl is a one of the oldies when it comes to programming, with a rich and very long history. After more than a quarter of a century Perl is still here, it’s still kicking (ass) and taking names. Unfortunately as far as the “names” go, a lot of them are wrong. People know a lot of things about Perl, but not everything they know is true. Here are a few very popular myths about Perl.
Perl is hard
You don’t say! Perl is hard to use, it’s hard to learn, it’s hard to understand and there’s just no point in it as there are perfectly easy to use languages out there. False!
Perl has a lot in common with many familiar languages for most developers. If you know some C or Unix you have a head start in getting to know Perl. Categorising programming languages in boxes of hard and easy is generalizing and just plain wrong. Each language has it’s own particularities that define it, none of them are hard or easy, they’re all somewhere in between, depending on the developer (to be).
To repel the “Perl is hard” myth we can just look at (one of) the Perl mottoes: there’s more than one way to do it. That encompesses Perl versality perfectly, because you can use Perl in any number of ways, you can find different solution to a problem. This way you can create your own style, you don’t have to adapt to Perl, Perl adapts to you. Knowing just a bit of Perl can go a long way, and because of its similarities with other languages we’ll happily put the “Perl is hard” notion in the trash bin.
Perl is dead
Well, this article is not an eulogy so we can just say “Busted” right now. No, really, this one is just ridiculous and is mostly propagated by those who see Perl as an antiquated way of coding, something that belongs in the past and it’s just barely scraping for a breath. If you’ve read one of our previous articles, published just a couple of weeks ago you could see that perl is (back) in the top 10 programming languages. Now that’s not something a dead language can do, is it?
Perl can’t be used on serious projects
Perl is not safe
This notion mostly come from the fact that the source code in Perl is readable in order for it to be interpreted. While this is true it does not mean that Perl code is insecure code. Hiding your code won’t make it safe just like showing it won’t make it unsafe. Safe and not safe is just about how you go about writing your code. If you really want to hide it you have options through source filters and whatnot. Just because people can write insecure Perl code does not mean that Perl as a whole in insecure.
Perl is too slow to be practical
In this case slow depends on the reference term you have. It might be slower than C but it’s faster than Java. In any case it’s not too slow, if it was we wouldn't have used it for 25+ years would we? The slow aspect depends on a lot of things starting with the way you write your code, with the style you use. Basically if you give Perl more things to process it takes longer, if you make it simpler, it takes less time. Simple as that.
There are plenty of things about Perl that people view as true, myths that make up reasons to avoid it. But, as you know, myths are meant to be broken, and we just busted a few.Tweet