http://www.perlmonks.org?node_id=102271


in reply to Perl VS Python

There are four ways in which one language might be better than another, off the top of my head. any remarks about python which follow are not very well-informed, by the way.

1. it suits your tasks
If you're munging masses of data, dealing with texts, creating conversational interfaces, doing things quickly, designing as you build (oops), or no doubt many other things I haven't encountered, perl is what you need. I'm afraid someone else will have to write the corresponding python list, but i'm sure it's long too.

2. it suits your temperament
Perl is muscular, idiomatic, expresssive, poetic, ambiguous, robust, a little messy. Python is meticulous, brittle, precise, clear and direct. There are people who prefer that, and it certainly makes it easier to read someone else's code. But less fun.

3. it's widely-used
This confers obvious benefits in terms of your employability and versatility. In the case of perl it also gives us cpan, which is priceless, perlmonks, *.pm, and so on. It's not a level playing field, of course: perl's ubiquity is an accident of timing as much as anything. If python or ruby had been a normal part of the unix toolkit when the web exploded, who knows what this site would be called?

4. it's powerful
This is really the same as (1) - it can't be taken out of context and still mean anything - except for the fact that your tasks might change, or your understanding of them. If we had to define power, it's probably a product of the range of uses to which a language can be put and its ease and strength in each case. In that context, perl is more powerful than python: it's more versatile, it's easy to grasp and in the hands of a good idiomatic programmer, very strong indeed. But there are well-understood edges to the domain in which perl excels, and C is more powerful still, on this scale. But if it doesn't suit your needs...

To me, perl is better suited to my work and my tastes than anything else out there, and in my opinion it's a better investment in terms of what it might one day allow me to do.

but ymmv

PS. one quite often encounters arguments based on what perl programs are like, rather than what perl is like. If you come across one, make sure that people are comparing like with like. There's a lot of bad perl out there, not because perl is bad but because it's accessible and forgiving. These are good qualities.