4 ms·
I have been using Perl for the last 3.5 years (for work). Before that I used Python for 8 years. For the vast majority of things Python is better. Perl programm
by ceronman 10y ago
I have been using Perl for the last 3.5 years (for work). Before that I used Python for 8 years. For the vast majority of things Python is better. Perl programmers tend to say that the language is more powerful and allow for shorter programs, but in my experience, when writing the same program in Perl and Python, the later is more concise. There are some Perl features that save you keystrokes, for example, autovivification, but in the long run those are a lot of trouble. Also, it's really hard to learn to use Perl properly, it's full of inconsistencies and antipatterns, it's so easy to write bad code with it. Python is much simpler, consistent and with less corner cases. Python features (e.g. iteration protocol) seem more elegant to me. Perl features feel really hacky, they work, but they're rarely orthogonal and usually have surprising side effects.
One aspect where Perl still kickass is for writing shell scripts. Running commands, interacting with the filesystem and other tools is so easy. Once you know Perl, you rarely use bash, sed, grep or awk.