We have now two Perls. Perl 5, which has been around for more than 20 years just as the „Perl programming language“ and Perl 6, which has been developed for more than a decade and of which now stable versions exist.
The fact, that they are both called „Perl“ is a bit misleading. They are two different and incompatible programming languages. But they share the same community. And Perl conferences are usually covering both languages.
So this rises the question about the differences or about which of the two Perls to use.
Here are some differences:
- Perl 5 is well established and many people know it. Perl 6 has to be learned, even if it is relatively easy to learn for someone with a Perl 5 background.
- Perl 5 runs about three times faster than Perl 6
- Perl 6 programs are a bit shorter than Perl 5 programs
- Perl 6 regular expressions are even better than Perl 5’s regular expressions
- Perl 6 is more logical than Perl 5
- Perl 6 uses by default better numerical types
- Perl 6 makes it easier and more natural to do object oriented programming and functional programming
- Perl 6 has come up with a useful approach for doing multithreading.
- Perl 5 has so many cool libraries on CPAN, Perl 6 just a few.
Links: