Perl 5 vs Perl 6: Changes You Should Know

After being in development for more than five years, the first stable version of Perl 6 — the latest generation of the Perl family of programming languages — was announced in December 2015. Since then, it’s become a popular language, used extensively in a wide variety of projects. The TIOBE Index even ranks the Perl family as being the 9th most popular programming language. But Perl 6 contains some major changes over its predecessor. To learn more about the nuances between Perl 6 and Perl 5, keep reading.


One of the most notable differences between Perl 5 and Perl 6 is specification. Perl 6 began as a specification, which means that it can be re-implemented, and it also eliminates the need for programmers to read source code. This isn’t a technical difference between the two languages, but it’s still a major difference that shouldn’t be overlooked, especially if you are truing to decide which language is right for you.

Gradual Typing System

It’s also worth noting that Perl 6 has a gradual typing system, allowing programmers to choose their preferred typing. This may include static typing, dynamic typing, or even a combination of the two. Perl 5, on the other hand, didn’t offer static types, forcing programmers to use dynamic typing.

Formal Subroutine Parameter Lists

In Perl 5, subroutines are defined without formal parameter lists, passing subroutine arguments as aliased into the elements. Perl 6, however, introduces formal parameters.

Regular Expressions

Perl has long used regular expression as a primary feature. In Perl 6’s documentation, regular language expressions are referred to as “regexen.” This is because Perl’s pattern-matching abilities have exceeded its capabilities.


You’ll also see new junctions added to Perl 6. Junctions are essentially composite values of other values. They are created by combining one or more sets of values with junctive operators.

Two Different Languages

Although their names would suggest otherwise. Perl 5 and Perl 6 are two completely different programming languages. Some programmers even say that Perl 6 is no longer Pearl because of the extensive changes that it’s seen. Granted, there are still plenty of similarities, but the fact is that Perl 6 is vastly different from its predecessor. Perl 6 has been influenced by its predecessor, which is visible in the syntax, but each language has its own unique feel and purpose.

These are just a few of the most notable differences between Perl 5 and Perl 6. You can read more about the differences between Perl 5 and Perl 6 by clicking here.

Thanks for reading, follow your passion by finding the perfect course, just for you over on

Online Technology Courses Stone River eLearning